[MySQL] the user specified as a

2021-08-30  本文已影响0人  轻记事APP
解决

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)
上一篇 下一篇

猜你喜欢

热点阅读