-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't connect to mysql container from MySQL Workbench (Windows 10) #274
Comments
Here's my "docker version": Server: |
Problem solved: using hostname as localhost / port 3306, connected successfully. Thx. |
... I used 0.0.0.0:3306 connected successfully! |
I have When I click test connection the error dialog reads Host '192.168.99.1' is not allowed to connect to this MySQL server. Additionally - my environment is Win7 Home with the latest Docker Toolbox. Any suggestions? |
Same problem here. Docker Toolbox, Win10. 192.168.99.100 Getting same error message as @namelus |
Fixed it. I had to create a user which has origin set as '%' as such:
At the MySQL Workbench connection, use this new user. Worked. |
@saifulss it working for me |
That was useful for me -> tutorial |
i have created a docker container with an image of mysql 5.7 but i do not know how to connect from workbench to the database that is in that container... |
It looks mysql interpreting the -p as an argument, I just had to move the argument: docker run -p 3306:3306 --name some-mysql -e MYSQL_ROOT_PASSWORD=my-secret-pw -d mysql:latest copy from #95 |
Anything after the image name is passed as arguments to the server. Arguments for docker have to be before it |
@saifulss it's also working for me.thx. |
This allowed me to log in to Mysql via "tableplus"... but I am unable to create new tables from within that tool. I get the error message
Any ideas? |
You probably have to grant the right permissions. e.g. GRANT ALL PRIVILEGES ON <database_name>.* TO 'username'@'%' IDENTIFIED BY 'password' |
This syntax did not work for me. This worked instead:
|
This SO answer worked for me https://stackoverflow.com/a/51437525/10034557 |
Just worth noting that if you already have running MySQL or MariaDB on port 3306 it wouldn't work, go to your windows services, and disabled it. |
What worked for me was recreating the container with the -p 3306:3306 flag, it popped up the windows firewall dialog and once I clicked "allow" I was able to connect with 'localhost' thru MySQL workbench and PyCharm. Hope this helps! |
in SSL Tab set 'Use SSL' to 'No' |
Need help to connect to mysql container from MySQL Workbench (Windows 10). Here are the steps I took:
Installed Docker for Windows 10.
Downloaded mysql instance via command:
Verified that mysql container is running (checked via "docker ps"):
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
c1616f7623d4 mysql "docker-entrypoint..." 18 hours ago Up 24 minutes 0.0.0.0:3306->3306/tcp mysql_qa
Got he IP address of mysql container via "docker inspect mysql_qa":
"IPAddress": "172.17.0.2"
Verify mysql container' status via "docker logs mysql_qa" and got the following:
2017-03-17T14:47:57.495536Z 0 [Note] Event Scheduler: Loaded 0 events
2017-03-17T14:47:57.495719Z 0 [Note] Executing 'SELECT * FROM INFORMATION_SCHEMA.TABLES;' to get a list of tables using the deprecated partition engine. You may use the startup option '--disable-partition-engine-check' to skip this check.
2017-03-17T14:47:57.495732Z 0 [Note] Beginning of list of non-natively partitioned tables
2017-03-17T14:47:57.510976Z 0 [Note] End of list of non-natively partitioned tables
2017-03-17T14:47:57.511134Z 0 [Note] mysqld: ready for connections.
Version: '5.7.17' socket: '/var/run/mysqld/mysqld.sock' port: 3306 MySQL Community Server (GPL)
Installed MySQL Workbench for Windows 64bit.
Inside MySQL Workbench, I tried to connect to mysql container using IP address 172.17.0.2 and port 3306, it failed. I also tried to connect to 192.168.99.100 and port 3306. It failed too.
Any help will be greatly appreciated. Thanks ahead.
The text was updated successfully, but these errors were encountered: