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

SQL Error (2003): Can't connect to MySQL server on 'localhost' (10061)

gladiator6 posted 3 years ago in Creating a connection
I try to use Heidi Portable , try and with 6.0 stable but nothing same problem I try to use Windows XP and Windows 7 I check twice the ssh tunel and plink.exe file and same error I try and on virtual pc but nothing :(
Please help me this work on my friends PC-s they also try to help me I install mysql I know it's not in requarements but nothing. I use new localhost file but nothing try to install xaamp but he don't fix the problem please help me.
ansgar posted 3 years ago
Adding some commas and dots for readers would be really cool man :)

So, you have a locally installed server and on the same pc you want to use HeidiSQL? Just stick to "MySQL (TCP/IP)" connection, use "localhost" and "3306" as the right port. And, ensure the server is really running.
gladiator6 posted 3 years ago
Thank You.
Sorry abut commas and dots.smileI will try to fix that i future.
I need to use localhost because my server need to be logged from SSH tunel.
I also alredy install XAMPP and mysql service running try to connect using php and apache return Connected successfully.
But I still can't log in to Heidi SQL using 127.0.0.1 or localhost.
Please give me some advice how to fix this :(
Thank You in advance I think I need to have mysql before connect to my server using ssh tunel ? or ?
gladiator6 posted 3 years ago
When I use 127.0.0.1 don't work but when I try with localhost work fine to conect using php ...
spwestwood posted 3 years ago
I get this message when trying to connect over SSH tunnel. The same settings/user/pass work via command line and using MySQL bench.
This is only happening on certain servers, via SSH works fine on others.
xxXxxrbj posted 3 years ago
can any one help me then i connect it Say same i try all thing but i dont know what is the user name and the password !!!!! surprisedsurprisedsurprisedsurprisedunhappyunhappyunhappyunhappyunhappy
jfalch posted 3 years ago
xxX.. "then i connect it Say same" - what is that supposed to mean ? english it isn´t.
what user name / password do you not know ?
if you don´t know your database´s u/p, ask your provider.
If you don´t know SSH access u/p, ask your provider.
If you dont´know which u/p to type into one of HeidiSQL´s dialogs, specify dialog (session manager?) and page title (headers on top right of session manager).

jfalch posted 3 years ago
PS: calm down. this is not a kid´s playground. Using more than one exclamation point per sentence, or more than one emoticon per entry, will nearly guarantee that your post is either a) completely disregarded, or b) meets with an unfavorable response.
yogeshwari posted 3 years ago
Hey Plz help me out with this error->
SQL ERROR(2003): Can't connect to MySQL server on localhost(10061)
ansgar posted 3 years ago
No server installed on your local machine?
yogeshwari posted 3 years ago
I have installed apache , but still its showing an error
ansgar posted 3 years ago
Eh, so you have installed Apache, a webserver. Where did you read HeidiSQL can connect to Apache? You need MySQL, not Apache.
kthanid posted 3 years ago
I laughed entirely too hard at this. :)
xxXxxrbj posted 3 years ago
guys help me~!!!!!!unhappyunhappyunhappyunhappyunhappyunhappyunhappyunhappystill error

jfalch posted 3 years ago
xxXxxrbj, if you do give more information on what exactly your problem is, nobody will be able to help you. "dont know what is the user name and the password" is not sufficient.
xxXxxrbj posted 3 years ago
its say SQL Error (2003): Can't connect to MySQL server on 'localhost' (10061)
kthanid posted 3 years ago
Also, not hijacking other threads is probably a good start.

If the server is running and you have forgotten your username and password you can reset the root password.
kthanid posted 3 years ago
@xxXxxrbj: Again, you are providing almost no information of value.
xxXxxrbj posted 3 years ago
i dont know what it say i dont understand unhappyunhappyunhappy
kthanid posted 3 years ago
Let me try and make it clear:

* We know nothing about the server you are connecting to.

* We have no idea what username you are connecting with.

* We have no idea what your password might be, even if we knew the user (how could we know?).

* I have already given you a link to locally reset your root MySQL password.

* Your question has NOTHING to do with HeidiSQL specifically.

What else do you propose we do to help you?
jfalch posted 3 years ago
to start:
what type of database server are you using ? do you run it yourself on one of youtr machines, or are you using a server of your internet provider ?
what method is set in heidisql to access this server ? tcp/ip, ssh tunnel, or what ?

Abdull posted 11 months ago
I too ran into (2003)/(10061).
---
TL;DR: in my case, to resolve this error, I first had to run "plink root@myvps.example.com" once on my local computer in order to have my VPS' host key to plink's key cache.
--------------------------
Full report
--------------------------

Scenario: Using HeidiSQL, I want to connect to my VPS's MySQL database via an SSH tunnel.
Context: My VPS already has a MySQL server running. It has a MySQL user "root".

So using HeidiSQL, under Session manager:
On tab "Settings":
*Network type: MySQL (SSH tunnel)
Hostname / IP: myvps.example.com
*User: root
*Password: rootMYSQLpassword
*Port: 3306
*Compressed client/server protocol: unselected

On tab "SSH tunnel":
*plink.exe location: C:\Program Files (x86)\plink.exe (... I've put plink.exe at this location)
*SSH host + port: myvps.example.com ... port: 22
*Username: root
*Password: rootSSHpassword

I clicked "Save", then "Open".

I got the following error message:
--BEGIN--
SQL Error (2003): Can't connect to MySQL server on 'localhost' (10061)
--END----

Running "plink root@myvps.example.com" on my computer's command line gave me the following information:
--BEGIN--
The server's host key is not cached in the registry. You have no guarantee that the server is the computer you think it is.
The server's rsa2 key fingerprint is:
ssh-rsa 2048 my:personal:hex
If you trust this host, enter "y" to add the key to PuTTY's cache and carry on connecting.
If you want to carry on connecting just once, without adding the key to the cache, enter "n". If you do not trust this host, press Return to abandon the connection.
Store key in cache? (y/n) y
Using username "root".
--END----

So I provided "y".
Back in HeidiSQL and clicking "Open" again, now I was no longer given "SQL Error (2003)"!
But now I got a new error message:
--BEGIN--
SQL Error (1130): Host 'myvps.example.com' is not allowed to connect to this MySQL server
--END----

In my specific case, my MySQL server's user "root" only had the privilege to connect to MySQL from "localhost", from "::1", and from "127.0.0.1". Therefore, I had to provide my MySQL user "root" the privilege to connect to the MySQL database from "myvps.example.com". To do so, I ssh'd on my VPS, then on my VPS' shell:
--BEGIN--
(on the server shell)
mysql -p
(After providing my MySQL root user's MySQL password, I am now on the mysql client shell... recognizable by "mysql>". Now provide the mysql client shell the following command)
grant all privileges on *.* to 'root'@'myvps.example.com' identified by 'rootMYSQLpassword';
--END-----

Back at HeidiSQL, try "Open" once again. In my case, everything worked well now. I can successfully connect from HeidiSQL via SSH to my VPS' MySQL database.
jwanglof posted 9 months ago

Abdull wrote: I too ran into (2003)/(10061).
---
TL;DR: in my case, to resolve this error, I first had to run "plink root@myvps.example.com" once on my local computer in order to have my VPS' host key to plink's key cache.
--------------------------
Full report
--------------------------

Scenario: Using HeidiSQL, I want to connect to my VPS's MySQL database via an SSH tunnel.
Context: My VPS already has a MySQL server running. It has a MySQL user "root".

So using HeidiSQL, under Session manager:
On tab "Settings":
*Network type: MySQL (SSH tunnel)
Hostname / IP: myvps.example.com
*User: root
*Password: rootMYSQLpassword
*Port: 3306
*Compressed client/server protocol: unselected

On tab "SSH tunnel":
*plink.exe location: C:\Program Files (x86)\plink.exe (... I've put plink.exe at this location)
*SSH host + port: myvps.example.com ... port: 22
*Username: root
*Password: rootSSHpassword

I clicked "Save", then "Open".

I got the following error message:
--BEGIN--
SQL Error (2003): Can't connect to MySQL server on 'localhost' (10061)
--END----

Running "plink root@myvps.example.com" on my computer's command line gave me the following information:
--BEGIN--
The server's host key is not cached in the registry. You have no guarantee that the server is the computer you think it is.
The server's rsa2 key fingerprint is:
ssh-rsa 2048 my:personal:hex
If you trust this host, enter "y" to add the key to PuTTY's cache and carry on connecting.
If you want to carry on connecting just once, without adding the key to the cache, enter "n". If you do not trust this host, press Return to abandon the connection.
Store key in cache? (y/n) y
Using username "root".
--END----

So I provided "y".
Back in HeidiSQL and clicking "Open" again, now I was no longer given "SQL Error (2003)"!
But now I got a new error message:
--BEGIN--
SQL Error (1130): Host 'myvps.example.com' is not allowed to connect to this MySQL server
--END----

In my specific case, my MySQL server's user "root" only had the privilege to connect to MySQL from "localhost", from "::1", and from "127.0.0.1". Therefore, I had to provide my MySQL user "root" the privilege to connect to the MySQL database from "myvps.example.com". To do so, I ssh'd on my VPS, then on my VPS' shell:
--BEGIN--
(on the server shell)
mysql -p
(After providing my MySQL root user's MySQL password, I am now on the mysql client shell... recognizable by "mysql>". Now provide the mysql client shell the following command)
grant all privileges on *.* to 'root'@'myvps.example.com' identified by 'rootMYSQLpassword';
--END-----

Back at HeidiSQL, try "Open" once again. In my case, everything worked well now. I can successfully connect from HeidiSQL via SSH to my VPS' MySQL database.



Registered just so say that this worked beautifully for me!
Thanks a bunch! =D
Abdull posted 9 months ago
@jwanglof : Thanks! :)

Two more facts for this to work:
* In case you run into "SQL Error (1045): Access denied for user...@...(using password: YES)", then make sure that on the "SSH tunnel" tab, you provide a unique port which does not collide with any ports running on your local machine. Especially prefer to use another port if there is already an (additionally independent) MySQL server running on your local machine which already listens on port 3306.

* Make sure that on the "Advanced" tab, option "Use SSL" is unselected. In the default situation, when network type "MySQL (SSH tunnel)" is selected, this option is greyed out and unselected. But due to misconfiguration of my session name/profile, the "Use SSL" option was selected and greyed out. To unselect it again, first change network type to "MySQL (TCP/IP)", unselect the "Use SSL" option, then change network type back to "MySQL (SSH tunnel)".
sophie21 posted 9 months ago
helo everyone.., I too experience this problem..., when i open run my heideSQL but i cannot access my database... an error message prompted "SQL Error (2003): Can't connect to MySQL server on '127.0.0.1' (10061)".

please help me!
sophie21 posted 9 months ago
hello everyone,

i need help for my heidiSQL.

my database worked yesterday but im now experiencing this error. the error message goes this way "SQL Error (2003): Cant connect to MySQL server on '127.0.0.1' (10061)". i tried reinstall the SQL but still the problem goes on. how could i solve this one. im new and i need some vivid explanation.

thanks a lot.
MarioG posted 3 months ago
Helo, sorry for my english
I Use XP. my server is MariaDB.
I try to connect with Heidi in a local PC. The connection error is with both, putting localhost or 127.0.0.1
user: root
pass: (blank)
How I correct this error?
Abdull posted 3 months ago
I ran into error (2003)/(10061) for another reason:

My client computer had been running for quite some time, with a few HeidiSQL crashes in between.

I assume that one of these crashed HeidiSQL instances had hogged some of my client computer's port used for connecting to the remote server.

One solution to again successfully connect to the remote server was to restart my client computer. Probably, there are "nicer" solutions such as freeing the hogged port.

Mandaliya Gunjan posted 3 months ago
I face one error at the time of open the Heidi shortcut like,

SQL Error (2003) in statement #0;Can't connect to MySQL server on '10.125.63.10'(10061)

[/b]
So please help me to start the Heidi.....
MarioG posted 3 months ago

MarioG wrote: Helo, sorry for my english
I Use XP. my server is MariaDB.
I try to connect with Heidi in a local PC. The connection error is with both, putting localhost or 127.0.0.1
user: root
pass: (blank)
How I correct this error?



toc...toc
nobody can help me?

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