skip to Main Content

I know this question was already asked before (like here), but still I could not find a solution and those posts are quite old.

So I am able to connect to the remote db with an ssh connection and then use the command line like this:

// Putty SSH Connection
host: ssh.strato.de
port: 22
username: xxxxxxx 
password: xxxxxxx 

// connect to mysql with terminal
mysql -h rdbms -u xxxxxxx -p xxxxxxxx

If I try the same with ssh-tunneling in DBeaver I get an connection error

enter image description here

The ssh-tunneling itself seems to work. If I use the same credentials as above and press "Test tunnel configuration" I get a success message.

enter image description here

I tried several other options for port and host (localhost, rdbms.strato.de, etc), which I found via mysql show variables; show processlist; show user();, but none of them worked.
The Strato Support told me that I can only connect to the db internally with phpmyadmin or remotely wiht putty and mysql, but since the last method is working, shouldn’t ssh-tunneling also work?

2

Answers


  1. Dbeaver – Database connection using SSH Tunnel

    • Open dbeaver
    • Click on "New Database Connection", in the following "main" window enter the MySQL server host relative to the SSH server, and MySQL running port, my setting is default (localhost, 3306)
      specify MySQL user to connect with and user password.
      dbeaver main
    • In the "SSH" part, specify the SSH host, port, user also the authentication method used, like SSH private key
      dbeaver ssh
      Test connection and use.
    Login or Signup to reply.
  2. On shared hosting setups (e.g. IONOS) there might be a restriction when trying to connect to MySQL from external client

    https://www.ionos.com/help/hosting/troubleshooting-mysql-databases/connection-and-access-problems-with-mysql-databases/

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search