![cover](https://img-blog.csdnimg.cn/ee6637a044c943bb9ac414ce5b66b002.png)
“You are not allowed to create a user with GRANT”错误出现原因及解决方法:
2、创建新用户:create user '用户名'@'localhost' identified by '123456';3、设置用户权限:grant all on *.* to 'firstuser'@'localhost';8.0之后的mysql不支持 授权的时候就进行用户创建,所以创建 之后才能授权;1、查看正在mysql登录状态的用户:select current_user;3、登录验证查
·
一、出现原因:
8.0之后的mysql不支持 授权的时候就进行用户创建,所以创建 之后才能授权;
二、解决方法;
1、查看正在mysql登录状态的用户:select current_user;
2、创建新用户:create user '用户名'@'localhost' identified by '123456';
3、设置用户权限:grant all on *.* to 'firstuser'@'localhost';
3、登录验证查看权限:mysql -ufirstuser -p
4、再次查看当前登录用户:
更多推荐
所有评论(0)