Ads were blocked - no problem. But keep in mind that developing HeidiSQL, user support and hosting takes time and money. You may want to send a donation instead.

keep getting error #0

ploppy's profile image ploppy posted 7 years ago in Creating a connection Permalink
hello
as a new user to heidi, i am trying to work out why i cannot create connection between my pc and server. I have entered all the correct credentials from pc but what I did notice was on the server it is currently setup for localhost and also there is no port # allocated. how do in check wahat i need to be setup on server machine to create connection? Many thanks

I am using centos6 with control panel.

PS: also I cannot seem to attach a pic here to show problem.
ansgar's profile image ansgar posted 7 years ago Permalink
You could post the text of the error message. Did you know that, in any Windows error popup dialog, you can press Ctrl+C to get the message into your clipboard.
ploppy's profile image ploppy posted 7 years ago Permalink
good idea. here is the error: [Window Title]
Error

[Content]
SQL Error (2003) in statement #0: Can't connect to MySQL server on 'xx.xxx.xxx.xx' (10061)

[OK]
Ads were blocked - no problem. But keep in mind that developing HeidiSQL, user support and hosting takes time and money. You may want to send a donation instead.
ansgar's profile image ansgar posted 7 years ago Permalink
Ok, I guess you entered the right IP or hostname. You said

on the server it is currently setup for localhost


That may be the cause. You must check that on server shell, by examining your mysql.cnf/ini file. Find the setting for "skip-networking".
Or, if that's not set at all or is set to "0", then start a command line shell on MySQL and fire a
SELECT Host, User FROM mysql.users WHERE User='yourusername'

Then, if the "Host" column shows some specific IP address, localhost or whatever, that's the cause why you cannot connect from other remote computers.
logg's profile image logg posted 6 years ago Permalink
Since this is the top google result for
"
[Window Title]
Error

[Content]
SQL Error (2003) in statement #0: Can't connect to MySQL server on 'localhost' (10061)"

, I will leave my resolution here:

Try increasing the plink.exe timeout under the SSH tunnel tab of the Heidi SQL session manager window. At the default 4 seconds, I received this error. After increasing the timeout to 8 seconds, I was able to connect.
AlexPresland's profile image AlexPresland posted 6 years ago Permalink
I found a problem of caching the server's host key... HeidiSQL doesn't spot this and prompt the user to accept it into PuTTY/Plink's local cache on the first connection.

There are two solutions:
[1] Manually establish the SSH connection using PuTTY first, in order to get the key into the local cache
or
[2] Follow the instructions on http://caseymclaughlin.com/articles/ssh-tunnels-with-plink-and-heidisql to use plink to get the server key in the cache.
AlexPresland's profile image AlexPresland posted 6 years ago Permalink
...this only applies if you're using the "MySQL (SSH tunnel)" network type option.
ansgar's profile image ansgar posted 6 years ago Permalink
I rewrote the whole plink logic and committed that yesterday. That way, HeidiSQL prompts you whether to cache the host key, and other error messages are displayed as well. You should update to the latest build and try again.
AlexPresland's profile image AlexPresland posted 6 years ago Permalink
Cool. I'll try to find some time to go and clear out my server key cache and do some additional validation for you.
jfalch's profile image jfalch posted 6 years ago Permalink
works well here (after removing stored session key from registry).

small nitpick: please remove the final (y/n) in text, since it is immediately followed by Yes/No buttons..

good solution to a long-time problem.
Ads were blocked - no problem. But keep in mind that developing HeidiSQL, user support and hosting takes time and money. You may want to send a donation instead.
AlexPresland's profile image AlexPresland posted 6 years ago Permalink
Yup, all working just fine. I also corrupted one of my keys and was correctly warned that it had changed.

I agree with jfalch's nit pick.

Great work.
ansgar's profile image ansgar posted 6 years ago Permalink
"(y/n,...)" removed in r4749.
jfalch's profile image jfalch posted 6 years ago Permalink
thanks.
bmrsmt666's profile image bmrsmt666 posted 4 years ago Permalink
i dnt get the access to my database due to host name /ip,giving me error of 10060 at ip this 83.169.8.248
AlexPresland's profile image AlexPresland posted 4 years ago Permalink
That's a different error to the error #0 that this thread is covering. Try looking at this solution for error 10060: http://forums.mysql.com/read.php?34,49742,239961
baskar's profile image baskar posted 4 years ago Permalink

Please restart you system, this error will go and work fine as expected earlier..

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