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

来源:互联网 发布:mac ndk 下载 编辑:程序博客网 时间:2024/05/22 11:54

搭建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)

看来对这个命令有要个要求




1 0
原创粉丝点击