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)
看来对这个命令有要个要求
主库执行:
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)
看来对这个命令有要个要求
相关文章推荐
- 关于weka连接mysql的一些问题
- Mysql存储引擎
- Windows下MySQL 5.6.27.0.安装及配置
- 报错:1130-host ... is not allowed to connect to this MySql server
- mysql启动问题access denied for user 'root'@'localhost'(using password:YES)
- Navicat for MySQL 查看BLOB字段内容
- Mysql导出表结构及表数据 mysqldump用法
- 在cmd启动mysql命令服务
- MYSQL中LIMIT用法
- MySQL创建新用户、增加账户的2种方法及使用实例
- MySql中having字句对组记录进行筛选使用说明
- mysql dump 备份命令
- Mysql中文汉字转拼音的实现(每个汉字转换全拼)
- MySQL无法重启问题解决Warning: World-writable config file ‘/etc/mysql/my.cnf’ is ignored
- MySQL协议分析
- mysql5.6不能输入中文
- mysql 主键自动增长问题
- mysql pconnect长连接,短连接时掉数据问题
- R连接mysql数据库
- MySQL修改root密码的多种方法