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

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 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:

bind-address =

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?


the problem is sequel pro using ssh tunnel will us probably making a connection to localhost and not 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

  • Thanks, Mike. But this is what I've started with, before switching to '%'. Just updated mysql.user, flushed privileges again: same error. – Division by Zero Jun 6 '15 at 22:49

Figured it out. Unknowingly, I have been running two instances of mysql on the server – the original installation along with xampp. The Sequel Pro was connecting to the original installation, which, of course, did not have my newly created user.

Question remains, however, why did it choose the old mysql disregarding paths that specify xampp installation... Oh well.

Thanks to all who tried to help.


I met this issue on Ubuntu 18. Before on Ubuntu 16 it can connect successfully. Found the solution, shared here just in case someone cares:

In the latest MariaDB+Ubuntu18:

select * from mysql.user;

will show root@local has plugin unix_socket, which caused Sequel Pro SSH tunnel failed to use root for mysql.

Change it by:

UPDATE mysql.user SET plugin = 'mysql_native_password' where host='localhost' and user='root';

Then you can login via tunnel again.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.