distal-attribute
distal-attribute
distal-attribute
distal-attribute

newbe question: connecting to remote MySQL via SSH

royhink posted 2 years ago in Creating a connection
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.
royhink posted 2 years ago
Sorry, forgot to post my OS and platform:
On Win7 Using HeidiSQL 7.0.0.4051 32 bit v7.0.0.4053
MySQL on Remote Ubuntu server
jfalch posted 2 years ago
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

localhost
%

for your connect to work.
kalvaro posted 2 years ago
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.