keep getting error #0

[expired user #6572]'s profile image [expired user #6572] posted 12 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 12 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.
[expired user #6572]'s profile image [expired user #6572] posted 12 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]
ansgar's profile image ansgar posted 12 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.
[expired user #7599]'s profile image [expired user #7599] posted 10 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.
[expired user #7939]'s profile image [expired user #7939] posted 10 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.
[expired user #7939]'s profile image [expired user #7939] posted 10 years ago Permalink
...this only applies if you're using the "MySQL (SSH tunnel)" network type option.
ansgar's profile image ansgar posted 10 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.
[expired user #7939]'s profile image [expired user #7939] posted 10 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 10 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.
[expired user #7939]'s profile image [expired user #7939] posted 10 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 10 years ago Permalink
"(y/n,...)" removed in r4749.
jfalch's profile image jfalch posted 10 years ago Permalink
thanks.
[expired user #9016]'s profile image [expired user #9016] posted 9 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
[expired user #7939]'s profile image [expired user #7939] posted 9 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
[expired user #9625]'s profile image [expired user #9625] posted 8 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.