Cant connect to MySQL Docker (port problem?)
Posted: 26 Jun 2024, 17:40
Hi,
I'm working on setting up a MySQL DB on my F4-424-Pro.
I Installed Oirtainer, Docker Manager and Docker Engine.
Then i tested different Isos for MySQL but the only one that worked as it should was this 5.7 version, because the "latest" was just stuck restarting/booting).
https://hub.docker.com/r/mysql/mysql-server
--------------------
It's the first time dealing with Linux or any of this, so i'm somehow happy that I then managed to install "PuTTY", and log into the server as Admin with my PW.
Then i used: docker exec -it ceb8771ca5b1 mysql -uroot -p
It also worked and i can log into the MySQL server
-------------------------
My problem starts when i try to use the MySQL Workbench
SSH Hostname: 192.168.0.115:9222 (this is the port that i've set in TOS 5.1)
SSH Username: Admin
MySQL Hostname: 127.0.0.1 (chat GPT said that the emulated MySQL Iso would basically connect to itself)
MySQL Sever Port: 35809
Username: root
I've tried different IPs and ports... nothing seem to work and I'm just confused, because I think the Workbench does the SSH 102.168.0.115:9222, but based on the error it seems that it doesnt?
I hope you can help me... is it the router? But the connection is local..... so it has to be the NAS itself?
I'm working on setting up a MySQL DB on my F4-424-Pro.
I Installed Oirtainer, Docker Manager and Docker Engine.
Then i tested different Isos for MySQL but the only one that worked as it should was this 5.7 version, because the "latest" was just stuck restarting/booting).
https://hub.docker.com/r/mysql/mysql-server
--------------------
It's the first time dealing with Linux or any of this, so i'm somehow happy that I then managed to install "PuTTY", and log into the server as Admin with my PW.
Then i used: docker exec -it ceb8771ca5b1 mysql -uroot -p
It also worked and i can log into the MySQL server
-------------------------
My problem starts when i try to use the MySQL Workbench
SSH Hostname: 192.168.0.115:9222 (this is the port that i've set in TOS 5.1)
SSH Username: Admin
MySQL Hostname: 127.0.0.1 (chat GPT said that the emulated MySQL Iso would basically connect to itself)
MySQL Sever Port: 35809
Username: root
I've tried different IPs and ports... nothing seem to work and I'm just confused, because I think the Workbench does the SSH 102.168.0.115:9222, but based on the error it seems that it doesnt?
But if I change the port from 9222 to something else the connection takes longer and i get this error:failed to connect to mysql at 127.0.0.1:42455 through SSH tunnel at [email protected]:9222 with user root lost connection to MySQL server at reading initial communication packet, system error:0
Cannot connect to database server
your connection attempt faild for user "root" to the MySQL server at 127.0.0.1
Cannot Open SSH Tunnel:Timeout connecting to 192.168.0.115
I hope you can help me... is it the router? But the connection is local..... so it has to be the NAS itself?