解决mysql8报错:ERROR 1410 (42000): You are not allowed to create a user with GRANT

1. 今天刚装了mysql8.0.13,试着分配几个账号和权限,结果报错

2. 查资料得知mysql8的分配权限不能带密码隐士创建账号了,要先创建账号再设置权限

输入命令:Grant all privileges on test.* to 'test'@'%'; 又报错:You are not allowed to create a user with GRANT ;

不允许使用grant命令,怎么会没权限,奇怪。

3.后来想到了mysql数据表user中的host

于是修改host:update user set host='%' where user='test';

再执行两次

Grant all privileges on test.* to 'test'@'%';

成功:

注释:如果原来有用户后面的IP部分必须与原来的一样

 

阅读剩余
THE END
阿里云ECS特惠活动
阿里云ECS服务器 - 限时特惠活动

云服务器爆款直降90%

新客首单¥68起 | 人人可享99元套餐,续费同价 | u2a指定配置低至2.5折1年,立即选购享更多福利!

新客首单¥68起
人人可享99元套餐
弹性计费
7x24小时售后
立即查看活动详情
阿里云ECS服务器特惠活动