ggelashvili/learnphptherightway-project

Workbench don't connect

vitorlfaria opened this issue · 2 comments

Hello Gio!

First of all, i'm loving your series! You are helping me a lot to learn this.

My problem is, i already use a database in the port 3306, so i changed the port of the mysql for the project to 3305. Now, when i try to connect it to the workbench it do not connect and shows me this error: "Failed to connect to MySQL at 127.0.0.1:3305 with root user. Lost connection to MySQL server at 'reading initial communication packet', system error: 0"

I've tried a lot of things, such as change the timout in the preferences. But it dont seens to work. Maybe it was the port that i used and i have to use a specific port for this project? I'm new to it and dont know exactly what to do.

And sorry for my english if its not good. Its not my natural language.

Update!!!
I've managed what was wrong. In the docker-compose file, i've changed the ports from 3306:3306 to 3305:3305 and it was what was going wrong, searching on the internet i found out that i just have to change the "first part of the port", so I changed it to 3406:3306 and it worked!

That's awesome. Nice job. Sorry I wasn't able to reply to you earlier, have limited access to the PC this week. Glad you figured it out. 👍