I'm trying to connect to a remote MariaDB server through SSH using Navicat Premium from Windows but all the time I can't and get this error:
2013 - Lost connection to MySQL server at 'reading initial communication packet', system error: 0
I have read and follow many guides on Internet so I get lost at this point and don't know what else to do. This is what I have done:
At server side (remote host with CentOS 6.6 and mysql Ver 15.1 Distrib 5.5.44-MariaDB, for Linux (x86_64) using readline 5.1):
/etc/my.cnf.d/server.cnfsetup this parameters:[mysqld] #skip-networking #tried with this bind-address = 0.0.0.0 #tried with this bind-address = 127.0.0.1 #tried with this bind-address = localhostRESULT: No success, same error and can't connect
/etc/hosts.allowset this parameters:# tried with this #ALL:ALL # tried with this ALL:PARANOID # tried with this ALL:MY_IP_ADDRRESULT: No success, same error and can't connect
/etc/ssh/sshd_configsetup parameters for allow TCP forwarding:AllowTcpForwarding yes
RESULT: No success, same error and can't connect
Server has IPTABLES enabled but port 3306 is open:
#MySQL/MariaDB -A INPUT -m state --state NEW -m tcp -p tcp --dport 3306 -j ACCEPT This is how the configuration looks like on Navicat:

Can any give me a hand on this? I have spent hours on this without success
ssh -L 3306:mysqlServer.example.com:3306 [email protected]andmysql -h 127.0.0.1 -u root -pwould be the normal way of doing this. What are you trying to accomplish by connecting through an SSH tunnel?