美文网首页
[MySQL] the user specified as a

[MySQL] the user specified as a

作者: 轻记事APP | 来源:发表于2021-08-30 10:27 被阅读0次
解决

mysql 5

grant all privileges on *.* to root@"%" identified by "Passwd"

mysql 8

// 8.0.11 版本之后移除了grant 语句添加用户的功能
// 也就是说 grant... 只能适用于已存在的账户

mysql> create user 'root'@'%' identified by '密码';
Query OK, 0 rows affected (2.35 sec)
 
mysql> grant all privileges on *.* to 'root'@'%';
Query OK, 0 rows affected (0.06 sec)
 
mysql> flush privileges;
Query OK, 0 rows affected (0.06 sec)

相关文章

网友评论

      本文标题:[MySQL] the user specified as a

      本文链接:https://www.haomeiwen.com/subject/hxiniltx.html