Report this

What is the reason for this report?

Connecting to Mysql database via workbench.

Posted on August 6, 2015
tgif

By tgif

Hi guys,

Im a bit new to digital ocean, Im trying to connect to the MySQL database via workbench and im having a bit of problems. I really need step by step help on how to connect to the MySql database.

I have a windows machine. I tried connecting over standard ( TCP/IP) and also standard( TCP/IP) over SSH.

For the standard( TCP/IP) over SSH: When i try connect it says could not connect to the ssh tunnel, and proceeds to say " Your connection attempt failed for user ‘root’ from your host to server at 127.0.0.1:3306: Can’t connect to MySql server on ‘127.0.0.1’ (10060)

I just dont know what im doing wrong?



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

This is an old post, but since it was one of top Google searches I’m adding the solution that worked for me to fix the issue.

For anyone who has working SSH connection, like with Putty already, but still get connection errors after following this tutorial

These two things helped me fix:

Generate a private SSH key without passphrase When using Puttygen, import your existing private key, then export it as OpenSSH. I previously used simply save private key and it didn’t work with Workbench (more info here https://www.digitalocean.com/community/questions/trying-to-connect-to-mysql-database-server-through-mysql-workbench-using-ssh)

By default MySQL does not allow remote connections. To change this you will need to modify the /etc/mysql/my.cnf file, change the bind-address line to reflect your droplet’s IP address:

bind-address        = your_database_IP

and then restart MySQL:

service mysql restart

what happen i faced this problem.

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.