When connecting to MySql database remotely
ERROR 1045 (28000): Access denied for user'root'@'localhost' (using password: YES)
step1 Go inside the container
Docker exec -it [mysql container name] /bin/bash
step2 Log in to mysql
Mysql -uroot -p
password:[Enter your password] or press enter directly
step3 Execute the following command
use MySQL;
step4 authorization
Grant all privileges on *.* to ‘root’@'%' identified by ‘yourPassword’;
step5 refresh
Flush privileges;