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!
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
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.