Workbench Remote Connection to nging mysql

Posted September 1, 2017 4.4k views
NginxMySQLLAMP Stack

Hi folks, I am pretty new to this, whole server management I always user serverpilot. Now I wanted to set up It on my own. I followed this guide, and got everything up and running with SSL.
I disabled the ssh access with password and use a ssh_key

Now I just wanted a GUI to manage the mysql database.
I tried that tut
But I always get errors either

Can't connect to MySQL server on '' (61)


Lost connection to MySQL server at 'reading initial communication packet', system error: 0

I tried following things:

In /etc/mysql/mysql.conf.d/mysqld.cnf

  • Comment line bind-address changed address to server ip address


sudo ufw allow 3306/tcp
sudo service ufw restart
mysql> GRANT ALL ON db_name.* TO IDENTIFIED BY ‘my_password/';

xx.xx.xx.xx my local IP address of laptop/desktop


mysql> GRANT ALL ON *.* TO 'patrick'@'%’;

Always restart mysql-server after changing

service mysql restart

The mysql workbench parameters are:
SSH Username: ssh username I use to connect via ssh username@serveripaddress
SSH Key File: path to .ssh/id_rsa
MySQL Hostname: Localhost or or Empty
MySQL Server Port: 3306
Username Patrick

If I click “Test Connection” it prompts me for a password, enter the password the described errors appear.

Stuck here since 3 days.


1 comment

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.

Submit an Answer
2 answers


If you are using Workbench to connect to MySQL via SSH you don’t have to change the bind-address. It should work out of the box with the rest of the things that you’ve done.

Besides that, if you stick to the things that you’ve done, I would just suggest changing your bind-address to, restart MySQL and then it should work.