I can't connect to a MySQL 8 server sitting on my CentOS 7 server from my Mac computer via workbench.

I already set bind-address to and added port 3306 to firewall publicly.

I also have a root user that can access any IP address ('root'@'%')

When I ran telnet 3306, I got the error message

Connecting To not open connection to the host, on port 3306: Connect failed

How can I connect to MySQL from my Mac?


I resolved this issue. Since my VPS is a shared server, I think it seems impossible to connect to the port 3306 directly from my Mac computer.

So, what I did was that I first connected to my server via SSH and then connect to mysql server locally. If you see the connection options in mysql workbench, you can select the SSH method to do that.

I hope this helps anyone who seeks some helps like me.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.