newbe question: connecting to remote MySQL via SSH

User, date Message
Written by royhink
2 years ago
Category: Creating a connection
2 posts since Thu, 07 Feb 13
I connected easily to my MSSQL DBs, but they were both set up with named pipes.

This is the error given by HeidiSQL:
/* Connecting to 192.168.xx.xx via MySQL (SSH tunnel), username root, using password: Yes ... */
/* Attempt to create plink.exe process, waiting 4s for response ... */
/* SQL Error (2003): Can't connect to MySQL server on 'localhost' (10061) */
/* Closing plink.exe process #2336 ... */

So, How do I debug this? Does error 2003 indicate that MySQL is set to not accept outside connections? Or, that the password is wrong? Or, is the port wrong?

The DB does exist. Another developer built it and connects to it via command line.

Any help appreciated.
Written by royhink
2 years ago
2 posts since Thu, 07 Feb 13
Sorry, forgot to post my OS and platform:
On Win7 Using HeidiSQL 32 bit v7.0.0.4053
MySQL on Remote Ubuntu server
Written by jfalchMoney, Euro
2 years ago
412 posts since Sat, 17 Oct 09
most probably depends on user restrictions in mysql server´s user table for the root user. what does

select host,user from mysql.user where user="root"

show ? AFAIK one of the "host" entries shown must be exactly one of


for your connect to work.
Written by kalvaro
2 years ago
601 posts since Thu, 29 Nov 07
MySQL bundles a command-line utility called perror that is very handy to find a description of error messages:

C:\>perror 2003
Win32 error code 2003: La operación de metarchivo solicitada no es compatible.

C:\>perror 10061
Win32 error code 10061: No se puede establecer una conexión ya que el equipo de destino denegó expresamente dicha conexión.

In this case, the second error code looks quite relevant: it isn't a MySQL error code, it's a Windows API code that roughly translates as "Could not establish a connenction because target machine expressly rejected the connection".

Have you installed a SSH tunnel?

Please login to leave a reply, or register at first.