0

I am trying to connect to my raspberry MYSQL server with MySQL workbench over SSH but get the error: "Could not connect the SSH Tunnel WARNING: Server public key has changed" I´m not sure why since I can connect with SSH with PUTTY.

MySQL workbench connection settings:
SSH hostname = local ip of my raspbery:22
SSH username = username of my pi
SSH Password = password of my pi
SSH Key File = nothing (no clue what to put here)
MySQL hostname = localhost
MySQL server port = 3308 (set in my.cnf)
username = root
Password = password of root
Default Schema = mysql
Any tips would be greatly appreciated!

1 Answer 1

0

Do you have multiple devices on the same local subnet that you connect to, using SSH?

Your client saves public keys associated with IPs in the known_hosts file. The most likely cause is that another device was assigned to that IP and your client expects the previous ssh server (with a different public key, depending on how PuTTY was installed) to appear. If it happens just that one time (your ssh client should be updating its known_hosts file), there's nothing to worry about.

If the problem does persist, try renaming/editing/deleting the public_hosts file (or registry key), so that the old public key for that server is not used anymore:

C:\Users\%USERPROFILE%\.ssh\known_hosts

or

HKEY_CURRENT_USER\SoftWare\SimonTatham\PuTTY\SshHostKeys

Make a backup just in case, either a copy of the file or a reg key export.

6
  • It´s sadly not a one time thing. I am totaly unable to connect with MySQL workbench. There should not be any other devices using that IP since its reserved in the router.
    – Viktor J
    Commented Feb 22, 2022 at 9:35
  • What kind of client are you using, on which OS and is this on your local network, and if so, how is this set up?
    – MiG
    Commented Feb 22, 2022 at 9:36
  • The dbms is MySQL workbench on my PC. The raspberry is runing debian OS 32-bit with MySQL server. SSH is enabled hence I can use PUTTY. I granted all priveleges to root on any ip. I have removed the ip-bind in my.cnf.
    – Viktor J
    Commented Feb 22, 2022 at 9:38
  • I'd try temporarily renaming (or deleting) the known_hosts file, then starting putty. Should probably be either here: C:\Users\%USERPROFILE%\.ssh\known_hosts or here: HKEY_CURRENT_USER\SoftWare\SimonTatham\PuTTY\SshHostKeys (make a reg key backup!) depending on how you set up putty (regular, portable etc)
    – MiG
    Commented Feb 22, 2022 at 9:44
  • So I renamed the known_hosts file and connected to the Raspberry with putty. It worked. I can now connect with MySQL workbench! Thank you so much! I have no clue how/why that worked but I am verry grateful.
    – Viktor J
    Commented Feb 22, 2022 at 9:57

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .