Mysql 8.0 ERROR 1064 (42000)

在mysql 8.0中使用mysql5.7的语法对mysql进行远程登录授权时会报语法错误
Mysql 8.0 ERROR 1064 (42000)

正确的姿势是:

CREATE USER ‘root‘@‘%‘ IDENTIFIED BY ‘****密码****‘; 
GRANT ALL ON *.* TO ‘root‘@‘%‘; 
ALTER USER ‘root‘@‘%‘ IDENTIFIED WITH mysql_native_password BY ‘****密码****‘;

Mysql 8.0 ERROR 1064 (42000)

mysql> use mysql;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
mysql> select host, user, authentication_string, plugin from user;

Mysql 8.0 ERROR 1064 (42000)

Mysql 8.0 ERROR 1064 (42000)

上一篇:不得不会的mysql架构, 让你更懂她!


下一篇:解决InnoDB: Table mysql/innodb_index_stats has length mismatch in the column name table_name. Please run mysql_upgrade