Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I am trying to create an SSH tunnel so that I can write data securely to a remote MySQL database. I start by setting up the tunnel:

ssh username@remote -L 3306:127.0.0.1:3306

This gets as far as prompting me for a password and then always gives me the following response:

Permission denied, please try again.

I know I have the password correct. I've chnged the password and flushed the privilages and tried again. The user on MySQL is set to accept from any host. The firewall and router have rules for the port.

I feel like I'm missing something obvious but cannot work out what, can anyone help.

share|improve this question
add comment

1 Answer

up vote 3 down vote accepted

The username/password that is asked is for the user on the *nix-box, not the mysql-username/password.

Make sure you can log in into the server by issuing the following command:

ssh username@remote
share|improve this answer
1  
Thanks, that was it, stupid mistake on my part. Thaks for your help. –  columbo Feb 13 '12 at 16:56
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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