Question

MySQL through Workbench

Hi guys, I know there are already threads about this but somehow I kept on missing something. So I decided to put it here. I’m new to SSH and basically anything about this (but I know MySQL) so I’m really trying hard to understand these stuff lol. So please bear with me.

I wanted to access MySQL through Workbench. Here’s what I did so far:

  • Successfully setup my Droplet with an IPv4 and a private IP (I’m confused which I should use).
  • Got the console running and updated my mysqld.cnf file:
# .....
! .....
! .....
[mysqld]
user            = mysql
pid-file        = /var/run/mysqld/mysqld.pid
socket          = /var/run/mysqld/mysqld.sock
port            = 3306
basedir         = /usr
datadir         = /var/lib/mysql
tmpdir          = /tmp
language        = /usr/share/mysql/English
bind-address    = 0.0.0.0
# skip-networking
  • Restarted service after that.
  • Then through my Workbench I selected Standard TCP/IP over SSH with the following entries:
Field Value
SSH Hostname (Private IP Address, also tried the public IPv4)
SSH Username root
SHH Password (Droplet password)
SSH Key File Exported OpenSSH key PuTTYGen with no Key passphrase
MySQL Hostname 127.0.0.1
MySQL Server Port 3306
Username root
Password (MySQL password)
Default Schema

Using the public IP I get a fingerprint mismatch. Using the private IP, I get no response at all.

Feel free to ask more details. Enlighten me please!


Submit an answer

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!

Sign In or Sign Up to Answer

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.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

*I certainly don’t recommend root access from all hosts. *

If you’re using MySQL Workbench you can use:

**1) Enable local IP in “TRUSTED SOURCES” in your db cluster overview tab. ** 2) then once that’s successful, in MySQL Workbench use the default: a. connection method: Standard (TCP/IP) b. enter using all your db cluster connection details, download the CA and select “SSL CA File” c. click test connection and then save.

I hope this simple method helps someone else. SECURELY!

Any issues, respond here and I’ll try and help.

UP

Having the exact same problem, can only connect though putty. No Workbench access nor web app access