MySQL Forums
Forum List  »  Security

MySQL over SSH Tunnel Doesnt let mysql users login
Posted by: Ryan Coulombe
Date: December 07, 2005 04:12PM

I have an odd problem with the grants stuff. Here is the scenerio:

Server 1 (10.0.0.21): Runs mysql
Server 2 (10.0.0.20): Runs apache

Server 2 runs an ssh tunnel to Server 1 that allows Server 2 to connect to the mysql server by going to Server2'sIP:3310.

The problem: It allows root logins, but NO OTHER users. When I try to connect to Server 1 from Server 2 as a USER (it works if I use root), it gives this error:

[rcoulombe@avalanche ~]$ mysql -P 3310 -p -u 'printfec_slocal' mysql
Enter password:
ERROR 1045 (28000): Access denied for user 'printfec_slocal'@'localhost' (using password: YES)


But, if I bind mysql on server 1 to it's internal IP, and connect directly to it, it works:

[rcoulombe@avalanche ~]$ mysql -p -h 10.0.0.21 -u printfec_slocal mysql
Enter password:
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 5 to server version: 4.1.10a-log

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql>

I've tried using % as the host, but even that doesnt work. I've tried using % with no password, still doesnt work. Ideally what I want is to run Mysql over SSH WITHOUT having to use the root user. But apperantly there is no way to do this from what I've encountered.

Options: ReplyQuote


Subject
Views
Written By
Posted
MySQL over SSH Tunnel Doesnt let mysql users login
5130
December 07, 2005 04:12PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.