Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I installed MySQL to a Windows box. I want to connect it from a Linux box.
I run plink to setup a remote port forwarding in Windows box.
I try to connect it from Linux box, but it's not working.

Windows (192.168.1.101)

C:\> plink -v -N -R 3306:localhost:3306 kev@192.168.1.102 -pw ADMIN

Also tried putty with this config:

Port forwarding: R3306->localhost:3306

Linux (192.168.1.102)

$ mysql
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

$ nc localhost 3306
J
5.5.283V6L[fnu▒▒!▒$N>-c-R9bbG{mysql_native_password
share|improve this question
2  
I believe that you are connecting to localhost via local socket, but you need to connect via localhost port, so connect with argument mysql --protocol=TCP. – week Nov 12 '12 at 10:12
    
@week Thanks. It works. Please post comment as answer. – kev Nov 12 '12 at 10:24
up vote 1 down vote accepted

I believe that you are connecting to localhost via local socket, but you need to connect via localhost tcp port, so connect with argument mysql --protocol=TCP.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .