1. Enter the container
Docker exec – it [MySQL container name]/bin/Bash
2. Log in to MySQL
mysql -uroot -p
Password: [enter your password] or enter directly
3. Execute the following command:
use MySQL;
4. Authorization
grant all privileges on ** to ‘root’@’%’ identified by ‘yourPassword’;
5. Refresh
Flush privileges;