当前位置:Gxlcms > 数据库问题 > mysql8.0无法给用户授权或提示You are not allowed to create a user with GRANT的问题

mysql8.0无法给用户授权或提示You are not allowed to create a user with GRANT的问题

时间:2021-07-01 10:21:17 帮助过:16人阅读

mysql8.0无法给用户授权或提示You are not allowed to create a user with GRANT的问题

提示意思是不能用grant创建用户,mysql8.0以前的版本可以使用grant在授权的时候隐式的创建用户,8.0以后已经不支持,所以必须先创建用户,然后再授权,命令如下:

mysql> create user ‘zabbix‘@‘localhost‘ IDENTIFIED BY ‘111111‘;
Query OK, 0 rows affected (0.04 sec)

mysql> grant all privileges on *.* to ‘zabbix‘@‘localhost‘
; Query OK, 0 rows affected (0.03 sec)

另外,如果远程连接的时候报plugin caching_sha2_password could not be loaded这个错误,可以尝试修改密码加密插件:

mysql> alter user ‘zabbix‘@‘localhost‘ identified with  mysql_native_password by ‘111111‘;

mysql8.0无法给用户授权或提示You are not allowed to create a user with GRANT的问题

标签:mysql8   not   创建   密码   授权   alt   could not   0 rows   支持   

人气教程排行