Closed eldermoraes closed 8 years ago
The above works for me. You're sure you're entering the correct password (it's myql, not mysql)?
Shame on me! Sorry...
np :)
1 hour with the same problem and it WAS the password.
ERROR 1130 (HY000): Host '172.17.0.1' is not allowed to connect to this MySQL server
got the same problem but not because of password
Why is IP 172.17.0.1 different from what I set
lol, anybody help me with this problem :((
To fix this, you need to create a new user with access from 172.17.0.1. If you do not want to allow root connections from 172.17.0.1, you can create a new user with access from that IP address.
To do this, connect to your MySQL server as the root user and run the following command:
Once you have granted the new user the necessary privileges, you can use it to connect to your MySQL server from 172.17.0.1.
const connection = mysql.createConnection({ host: "localhost", port: port, user: "your_user", password: "your_new_password", database: "your_db_to_connect", });
To fix this, you need to create a new user with access from 172.17.0.1. If you do not want to allow root connections from 172.17.0.1, you can create a new user with access from that IP address.
To do this, connect to your MySQL server as the root user and run the following command:
- CREATE USER 'localhost'@'172.17.0.1' IDENTIFIED BY 'your_new_password';
- GRANT ALL PRIVILEGES ON [your_db_to_connect].* TO 'localhost'@'172.17.0.1';
Once you have granted the new user the necessary privileges, you can use it to connect to your MySQL server from 172.17.0.1.
const connection = mysql.createConnection({ host: "localhost", port: port, user: "your_user", password: "your_new_password", database: "your_db_to_connect", });
thank you so much bro, I wasted a whole day for this f*cking problem, you're my hero
Hi,
I have just created a new container with this command:
docker run --name mysql -p 3306:3306 -e MYSQL_ROOT_PASSWORD=myql -d mysql:latest
When I try to connect with MySQL Workbench (using localhost) I get the message:
Access denied for user 'root'@'172.17.0.1' (using password: YES)
Any help?