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

与银河邂逅

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

分类 编程技术

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

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

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

输入命令:

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

又报错:

You are not allowed to create a user with GRANT;

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

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

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

于是修改host:

update user set host='%' where user='test';

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

再执行两次

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

成功:

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

但连接Navicat报错

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

这是因为mysql8的加密方式和Navicat不一样

4.修改加密方式:

alter user test identified with mysql_native_password by 'xxx';

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

再试,搞定! 

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

版权声明:本页面内容旨在传播知识,为用户自行发布,若有侵权等问题请及时与本网联系,我们将第一时间处理。E-mail:284563525@qq.com

目录[+]

取消
微信二维码
微信二维码
支付宝二维码