Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

1 Answer 1

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

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.