“You are not allowed to create a user with GRANT”错误出现原因及解决方法:

一、出现原因:

        8.0之后的mysql不支持 授权的时候就进行用户创建,所以创建 之后才能授权;

二、解决方法;

1、查看正在mysql登录状态的用户:select current_user;

“You are not allowed to create a user with GRANT”错误出现原因及解决方法:

  2、创建新用户:create user ‘用户名’@’localhost’ identified by ‘123456’;
“You are not allowed to create a user with GRANT”错误出现原因及解决方法:

     

 3、设置用户权限:grant all on *.* to ‘firstuser’@’localhost’;
“You are not allowed to create a user with GRANT”错误出现原因及解决方法:

3、登录验证查看权限:mysql -ufirstuser -p
“You are not allowed to create a user with GRANT”错误出现原因及解决方法:

 4、再次查看当前登录用户:“You are not allowed to create a user with GRANT”错误出现原因及解决方法:

本文来自网络,不代表协通编程立场,如若转载,请注明出处:https://www.net2asp.com/ddc3072ee0.html