0

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
  • 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

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.