MySQL SSH Tunnel on LAMP 1-Click

I can’t seem to tunnel into MySQL from a remote MySQL Client. I think the newer 1-Click LAMP has some changes to it.

I’m SSH’ing in correctly but getting a:

1698 - Access denied for user 'root'@'localhost'

I’ve changed /etc/mysql/mysql.conf.d/mysqld.cnf:

bind-address            = ::

Restarted MySQL daemon.

I’m not sure what to do on-and-above that. I’ve gone through the guides I’ve found on here, but this seems way harder than it needs to be. Any help would be appreciated.

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.

use mysql;
UPDATE user SET plugin='mysql_native_password' WHERE User='root';

Hi @j2adbd54a1f67ab82ceb67bd02,

There are a few things that need to be done prior to being able to perform an SSH tunnel.

Please try to do the following things :

  • Allow your IP on your droplet
  • If this doesn’t work, allow your IP to access port 3306 for MySQL
  • Make sure, you are accessing the proper port

If this doesn’t help, you’ll need to start looking into the logs of the server to see why the connection has been refused. The mentioned information, can be seen in the log file

  • /var/log/secure
  • /var/log/messages

Regards, KDSys