View Single Post
  #1  
Old 02-16-2007, 05:02 AM
Fabiola Fabiola is offline
Junior Member
 
Join Date: Aug 2006
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
Fabiola is on a distinguished road
Default connection over ssh tunnel???

Hello guys,
Running 4.1.11 on FC4, i wana connect to it remotely via an ssh tunnel. Logging on locally, all works fine i.e. mysql -h localhost -p gets me in.

I setup my ssh tunnel from on another box:
remotebox# ssh -N -L3306:localhost:3306 root@mysqlserver.somewhere.com

I get the following error:
remotebox@root:~$# mysql -h localhost -p
Enter password:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)

Things i've done:
moved socket=/var/lib/mysql/mysql.sock to socket=/tmp/sock for both server and client in my.cnf, on both systems.

This is how mysqld is started
/bin/sh /usr/bin/mysqld_safe --defaults-file=/etc/my.cnf --pid-file=/var/run/mysqld/mysqld.pid
/usr/libexec/mysqld --defaults-file=/etc/my.cnf --basedir=/usr --datadir=/var/lib/mysql --user=mysql --pid-file=/var/run/mysq -- This message may have been cut off and the rest will only be shown to members. To become a member, click here --
Reply With Quote
  Webmaster Forums - View Single Post - connection over ssh tunnel???
View Single Post
  #1  
Old 02-16-2007, 05:02 AM
Fabiola Fabiola is offline
Junior Member
 
Join Date: Aug 2006
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
Fabiola is on a distinguished road
Default connection over ssh tunnel???

Hello guys,
Running 4.1.11 on FC4, i wana connect to it remotely via an ssh tunnel. Logging on locally, all works fine i.e. mysql -h localhost -p gets me in.

I setup my ssh tunnel from on another box:
remotebox# ssh -N -L3306:localhost:3306 root@mysqlserver.somewhere.com

I get the following error:
remotebox@root:~$# mysql -h localhost -p
Enter password:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)

Things i've done:
moved socket=/var/lib/mysql/mysql.sock to socket=/tmp/sock for both server and client in my.cnf, on both systems.

This is how mysqld is started
/bin/sh /usr/bin/mysqld_safe --defaults-file=/etc/my.cnf --pid-file=/var/run/mysqld/mysqld.pid
/usr/libexec/mysqld --defaults-file=/etc/my.cnf --basedir=/usr --datadir=/var/lib/mysql --user=mysql --pid-file=/var/run/mysq -- This message may have been cut off and the rest will only be shown to members. To become a member, click here --
Reply With Quote