您的位置:首页 > 数据库 > MySQL

mysql修改root密码

2016-02-22 15:20 483 查看
[root@typecodes ~]# mysql -u root -p [使用root用户登录]
Enter password:
[无密码,直接回车]
Welcome to the MySQL monitor.
Commands end with ; or \g.
Your MySQL connection id is 3
Server version: 5.7.6-m16
Copyright (c) 2000, 2015, Oracle and/or its affiliates.
All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its affiliates.
Other names may be trademarks of their respective owners.
Type 'help;' or '\h' for help.
Type '\c' to clear the current input statement.
mysql> select * from mysql.user;
ERROR 1820 (HY000): You must SET PASSWORD before executing this statement
mysql> set password='this is a password sample';
ERROR 1819 (HY000): Your password does not satisfy the current policy requirements
######设置当前root用户密码
mysql> set password='MYSQLroota7612198981@';
Query OK, 0 rows affected (0.00 sec)
mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: