Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Navicat SSH Issues

I'm having trouble connecting to Navicat using an SSH Tunnel and seem to have all my ducks in a row, so wondering if anyone else who had done this has had success:

I set up a normal (TCP) user and checked the connection (host, port, user, password, and remote access ip added in cpanel) to make sure it worked.

As per the instructions, I then went to the SSH tab and enabled it ([x] SSH Tunnel).

I added the same IP for host, then 22 for port, then added root as user, selected password as authentication and then entered the root password.

I keep getting a host.mydomainame.com cannot connect to this mysql host.

I know it is working because: a) if I use the wrong user/pwd I simply get a 'could not create tunnel' error b) my host confirms that an SSH connection IS created the moment I connect with the correct root/pwd combo (even though the error message is generated on my side)

BTW as per Navicat I ensured that AllowTcpForwarding is set to yes.

I also confirmed using bithive I can connect to the same server from the same IP with the same user.

like image 303
Mark H Avatar asked Feb 16 '23 07:02

Mark H


1 Answers

Figured this out so thought I'd update so anyone else having issue can make this work. Answer turns out to be pretty basic.

The 'General Tab' where you set your MySql User has to have localhost, not the hostname or ip as it usually does, since the SSH Tunnel Tab creates the connection to that host first.

like image 139
Mark H Avatar answered Mar 04 '23 18:03

Mark H