MySQL:ERROR 1410 (42000)
实质问题是,授权语法不严谨导致.所授权的用户及其所在主机名,要与实际存在的用户及其主机名一致.
也就是说,如果已建用户是:root@localhost,你要授权给root@%,那肯定不行.必须一样才行.
mysql
mysql> grant select on *.* to 'root';
ERROR 1410 (42000): You are not allowed to create a user with GRANT
1、修改主机
mysql
update user set host='%' where user='root';
刷新权限
mysql
flush privileges;
再次授权
mysql
grant system_user on *.* to 'root';
2、若不修改主机,授权时要指明用户名和主机
mysql
grant select on *.* to user12@localhost;
最近更新:10/11/2024, 4:53:06 AM
上一篇:MySQL8修改密码|下一篇:MySQL8密码策略