I created a MySQL server docker instance using the following command:
[me@centos7 ~]$ docker run --name mysql_db -p 6604:3306 -e MYSQL_ROOT_HOST='%' -e MYSQL_ROOT_PASSWORD='jose' -d mysql/mysql-server:5.7
3d7d2c6231cbc2a8f96d1c965588c4349113c18aa01c8322dc79c670d6d02105
When I try to connect to the server, I get the following error:
[me@centos7 ~]$ mysql -uroot -pjose -h localhost -P6604
mysql: [Warning] Using a password on the command line interface can be insecure.
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
How should I fix my commands to be able to connect to the server instance using my local MySQL client?
docker exec -it mysql_db bash