暂无图片
MySQL 8.0:ERROR 1410 (42000): You are not allowed to create a user with GRANT
最近更新:2023-04-10 09:30:09

问题描述

客户反馈,在一套MySQL8.0环境,给一个用户授权失败

grant all on *.* to u_xxx@'%';
ERROR 1410 (42000): You are not allowed to create a user with GRANT

沟通发现,在授权之前,用update命令修改了账号密码:

update mysql.user set authentication_string=sha1('xxxxxx') where user='u_xxx';

复现过程

1.创建用户

mysql> create user u_test identified with caching_sha2_password by 'Test@123';
Query OK, 0 rows affected, 1 warning (0.00 sec)

mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)

2.查看用户信息

......