mysql 5.6 bug

Posted rsapaper

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了mysql 5.6 bug相关的知识,希望对你有一定的参考价值。

https://dev.mysql.com/doc/refman/5.6/en/account-management-sql.html

USE mysql;

SELECT Host,User FROM user;


【BUG】
CREATE USER ‘xx‘@‘%‘ IDENTIFIED BY ‘yy‘;GRANT ALL PRIVILEGES ON *.* TO ‘xx‘@‘%‘ WITH GRANT OPTION;
#ERROR 1045 (28000): Access denied for user ‘xx‘@‘localhost‘ (using password: YES)
CREATE USER ‘xx‘@‘localhost‘ IDENTIFIED BY ‘yy‘;GRANT ALL PRIVILEGES ON *.* TO ‘xx‘@‘localhost‘ WITH GRANT OPTION;

DROP USER ‘xx‘@‘%‘;
DROP USER ‘ll‘@‘%‘;


【5.6 无效,在没重启服务的情况下;未测5.7、重启】
UPDATE user SET Password=‘newyy‘ WHERE User=‘xx‘;
#ERROR 1372 (HY000): Password hash should be a 41-digit hexadecimal number
#SET PASSWORD FOR ‘xx‘@‘localhost‘ = ‘123‘;

【有效】
SET PASSWORD FOR ‘xx‘@‘localhost‘ = PASSWORD(‘123‘);

mysql> SELECT Host,User FROM user;
+-------------------+------+
| Host | User |
+-------------------+------+
| % | xx |
| 127.0.0.1 | root |
| ::1 | root |
| bigdata-server-02 | |
| bigdata-server-02 | root |
| localhost | |
| localhost | root |
| localhost | xx |
+-------------------+------+
8 rows in set (0.00 sec)

 

SET PASSWORD FOR ‘root‘@‘localhost‘ = PASSWORD(‘root123‘);
SET PASSWORD FOR ‘root‘@‘127.0.0.1‘ = PASSWORD(‘root123‘);
SET PASSWORD FOR ‘root‘@‘bigdata-server-02‘ = PASSWORD(‘root123‘);
SET PASSWORD FOR ‘root‘@‘::1‘ = PASSWORD(‘root123‘);

 



























以上是关于mysql 5.6 bug的主要内容,如果未能解决你的问题,请参考以下文章

使用 brew mysql.server 安装 mysql@5.6 不是命令

yum安装mysql 5.6

MySQL 5.6到MySQL 8的主从复制

centos 7 源码安装 mysql 5.6

带有 MySQL 5.6 的 Solaris 10 中的 MySQL 性能问题

MySQL 5.6到MySQL 8的主从复制