Problem Description:
After successfully running the mysql container, I entered mysql, and then we grant all privileges on *.* to 'reader' @'%' identified by '123456';
created a new user to allow any ip to be able to access, but an error was reported.
Cause Analysis:
According to the query information, it is because mysql8 no longer supports one step, but it needs to be done in two steps to successfully grant permissions to the user.
solution:
mysql> create user 'reader'@'%' identified by '123456';
Query OK, 0 rows affected (0.01 sec)
mysql> grant all privileges on *.* to 'reader'@'%' with grant option;
Query OK, 0 rows affected (0.00 sec)