Tag Archives: : ERROR 1045 (28000): Access denied for user ‘root’@’localhost’ (using password: YES)

[Solved] MYSQL Remote Connect Error: ERROR 1045 (28000): Access denied for user ‘root’@’localhost’ (using password: YES)

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;