搭建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)
看来对这个命令有要个要求