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

mysql 5.7 ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executi

2015-11-24 16:41 645 查看
搭建slave 库,

主库执行:

mysql> grant replication slave on *.* to repl@"192.168.40.132" identified by 'root';

报 设置了 skip-grant-tables 参数,在配置文件中将该参数注释掉,重启

mysql> grant replication slave on *.* to repl@"192.168.40.132" identified by 'root';

ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement.

mysql> SET PASSWORD FOR root=PASSWORD('root');

ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement.

mysql> FLUSH PRIVILEGES;

ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement.

mysql> SET PASSWORD FOR root=PASSWORD('root');

ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement.

mysql> alter user 'root'@'*' identified by 'root';

ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement.

mysql> alter user 'root'@'*' identified by 'root123';

ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement.

mysql> alter user 'root'@'localhost' identified by 'root';

Query OK, 0 rows affected (0.02 sec)

mysql> flush privileges;

Query OK, 0 rows affected (0.01 sec)

看来对这个命令有要个要求
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: