Solving the MySQL 8 error: ERROR 1410 (42000): You are not allowed to create a user with GRANT
Category Programming Technology
1. I just installed MySQL 8.0.13 today and tried to assign a few accounts and permissions, but encountered an error:
2. After researching, I found out that in MySQL 8, you can no longer create an account with password encryption when assigning permissions, you must first create the account and then set the permissions.
Enter the command:
Grant all privileges on test.* to 'test'@'%';
Then an error occurred:
You are not allowed to create a user with GRANT;
How could there be no permission to use the grant command, it's strange.
3. Later, I thought of the host in the MySQL user table.
So I modified the host:
update user set host='%' where user='test';
Then execute twice:
Grant all privileges on test.* to 'test'@'%';
Success:
But there was an error when connecting with Navicat.
This is because the encryption method in MySQL 8 is different from Navicat.
4. Change the encryption method:
alter user test identified with mysql_native_password by 'xxx';
Try again, it's done!
>
Original article link: https://blog.csdn.net/qq_34680444/article/details/86238516
** Click to share my notes
-
-
-