I am trying to connect to MySQL from my MySQL GUI (Sequel Pro if it matters) using SSH tunnel. However, I keep getting the following error (mysql.log):
[Note] Aborted connection 98 to db: 'example' user: 'example_user' host: 'localhost' (Got an error reading communication packets)
My connection settings look like the following:
- SSH host: example.com
- SSH port: 22
- SSH user: example_user
- SSH pass: ********
- DB host: 127.0.0.1
- DB user: example_user
- DB password: *******
- DB name: example
- DB port: 3306
I can connect to SSH with no problems. I can also connect to MySQL from inside SSH (using mysql -u example_user -p -h 127.0.0.1
)
However, tunneling is not working. I have AllowTcpForwarding yes
in sshd_config. MySQL config has bind-address = 127.0.0.1
.
I am using 16.04 LTS and MySQL Community Edition in my server.
What am I doing wrong? This is the first time I am seeing this issue.