首页 > 数据库技术 > 详细

Mysql 8.0 ERROR 1064 (42000)

时间:2020-08-16 09:24:31      阅读:79      评论:0      收藏:0      [点我收藏+]
在mysql 8.0中使用mysql5.7的语法对mysql进行远程登录授权时会报语法错误
技术分享图片

正确的姿势是:

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

技术分享图片

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)

原文:https://blog.51cto.com/lovejxs/2520581

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!