Ssh – Mysql, Sequel Pro: access denied, but connecting with terminal is OK

MySQLpermissionssshusers

I created a user 'vasya'@'%' with all priveleges on some dbs on a remote server.

When I ssh to the server I can mysql -u vasya -p without any problems.

However when I try to ssh tunnel via Sequel Pro using

host: 127.0.0.1
username: vasya
password: *****
port: 3306

ssh host: <My Server IP>
ssh user: <my server user that I used in terminal>
ssh password: ***********

I get:

Unable to connect to host 127.0.0.1 because access was denied.

Double-check your username and password and ensure that access from your current location is permitted.

MySQL said: Access denied for user 'vasya'@'localhost' (using password: YES)

In my.cnf I have set this, even though I don't think it should be necessary for ssh tunneling:

#skip-networking
bind-address = 0.0.0.0

Oh yes, I can successfully connect with Sequel Pro using another user I've created a while back that is no different then vasya.

What could be my problem with Vasya?

Best Answer

the problem is sequel pro using ssh tunnel will us probably making a connection to localhost and not 127.0.0.1. Now you might think that % might cover localhost but it doesn't. Try to make the same user with the same grants but instead of user@% you will do user@localhost