1. I just installed mysql 8.0.13 today, and tried to assign a few accounts and permissions, but got an error:

2. After checking the information, I learned that MySQL 8's permission assignment can no longer implicitly create accounts with passwords; you need to create the account first, then set permissions.
Enter the command:
Grant all privileges on test.* to 'test'@'%';
Another error:
You are not allowed to create a user with GRANT;

The GRANT command is not allowed. Why would there be no permission? 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 it twice
Grant all privileges on test.* to 'test'@'%';
Success:

But connecting to Navicat reported an error

This is because MySQL 8's encryption method is different from Navicat's.
4. Modify the encryption method:
alter user test identified with mysql_native_password by 'xxx';

Try again, done!

Original link: https://blog.csdn.net/qq_34680444/article/details/86238516