Krijk
March 10th, 2010, 04:35 PM
I'm trying to connect to a remote MySQL webserver over a SSH tunnel. I created the tunnel (with key-authentication) using:
ssh -f -L 3307:localhost:3306 user@www.myserver.com -N
When I try to connect to the server with a Python-script I keep getting connection errors.
OperationalError: (OperationalError) (1045, "Access denied for user 'dbuser'@'localhost' (using password: YES)") None None
The dbuser has 'dbuser'@'%' rights on the database and I can logon from the cli. When I try connecting to a local database (on port 3306) everything works fine, so it is obviously an SSH tunnel error.
I've fiddled with it for some time, but I'm not getting anywhere. Any suggestions?
ssh -f -L 3307:localhost:3306 user@www.myserver.com -N
When I try to connect to the server with a Python-script I keep getting connection errors.
OperationalError: (OperationalError) (1045, "Access denied for user 'dbuser'@'localhost' (using password: YES)") None None
The dbuser has 'dbuser'@'%' rights on the database and I can logon from the cli. When I try connecting to a local database (on port 3306) everything works fine, so it is obviously an SSH tunnel error.
I've fiddled with it for some time, but I'm not getting anywhere. Any suggestions?