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

Dariuszz posted 9 years ago in Creating a connection
I want to make my own private server for World of Warcraft but I've got an issue on connecting with HeidiSQL. I keep getting this error:
SQL Error: can't connect to MySQL server on 'localhost' (10061)

For as long as I know I'm not making any problems.
IP: localhost
User: root
Password: ascent

and I also start MySQL.bat before using HeidiSQL.

I'd really appreciate if someone could help me.
Dariuszz posted 9 years ago
by the way I installed the HeidiSQL 4.0 from:

I've only installed one thing, the "installer" part on the site. I hope that isn't the problem.
ansgar posted 9 years ago
Right, that is definitely not the problemsmileThe problem is, your local MySQL server is not responding, I guess it is not runnin at all. See taskmanager and watch for mysqld.exe .
Dariuszz posted 9 years ago
yes that one is on with around 200kb memory. Just don't get it. I was looking for the solution for hours and didn't understand what was wrong :(
Dariuszz posted 9 years ago
I hope you or anyone else knows a solution
ansgar posted 9 years ago
Did you check this?
Dariuszz posted 9 years ago
ok i see a problem now. It says I don't have a service called MySQL. Where can i download or install the service?
Dariuszz posted 9 years ago
ah still doesn't work. Found a service but still the same error.
Dariuszz posted 9 years ago
ok this is the thing:
i'm following this tutorial:

At 3:30 he starts to login on HeidiSQL.
When he connects he enters the server. At that point I don't enter the server, but I get the error instead. Maybe this will get you an idea?
Dariuszz posted 9 years ago
Aha now I found the solution :p
man what a stupid program.
I needed to FIRST run the service and THEN run the MySQL.bat.
Well thank you for your help anywayssmileat least someone answers my questions after all :D
ansgar posted 9 years ago
Don't know what your mysql.bat should do, but it's not some standard method to get MySQL running. Normally you start the server and then you can connect via any client like HeidiSQL.
Dariuszz posted 9 years ago
darn smiled too fast. now it doesn't work anymore. what server are you talking about?
Dariuszz posted 9 years ago
when i open mysql.bat it says that mysql is running. i'm not used to such a things like mysql. I only play games smile
ansgar posted 9 years ago
Well no problem to play games. That should not stop you from getting into MySQL or?

I meant the MySQL server. Try to do this:
- Start -> run -> cmd.exe
- Type this into the black DOS box:
mysql -hlocalhost -uroot -hascent<Enter>
- Post here what error you get
Dariuszz posted 9 years ago
uh my computer can't recognize mysql.
Dariuszz posted 9 years ago
i get the same error as if i would write "asdfasfadsf" (some random letters)
Dariuszz posted 9 years ago
well i wrote "mysql -hlocalhost -uroot -hascent" hope that was correct.
Dariuszz posted 9 years ago
i guess mysql.bat is the server because it's in the folder called Server, but he does not load completely. It says:

Please close this command only for Shutdown.
MySQL is running, don't close this window.

Somehow before when i "found the solution" it showed more than the 2 lines.
mltsy posted 9 years ago
Although this post is years old, just in case someone else is getting this error, as I recently did:

I unchecked the "compressed client/server protocol" checkbox and was able to connect. Not sure if that was the problem or not, because now I can check it and still log in fine, but that's all I recall changing. Although I also logged into SSH using putty and tried "mysql -uUSER_NAME -p" to test the connection between when it wasn't working and when it was, so that may have changed something as well.
Dariuszz posted 9 years ago
It is alright now. I have a Norton antivirus from 2005 and it blocked most of the things I wanted to start. When I figured that out I turned off Norton and all worked fine. I have heard of other people also having issues with old Norton versions on recent computers. So if anyone still has got an old Norton antivirus, just delete it, download an other free antivirus and your worries are gone :)
dogra_vj posted 9 years ago
hi..I am getting the same error altough i tried the following
- Start -> run -> cmd.exe
mysql -hlocalhost -uroot -hascent

after this I am getting "It is not recognised as internal or exteral command, operable program or batch file"

Please help

ansgar posted 9 years ago
Man, this is of course because your mysql.exe is not located in your path environment. Just add the path and it should run. Additionally, you have two "-h" parameters which cannot be correct as h means "Host". I guess "ascent" is your password - if so that must be prefixed by "-p", not "-h":
c:\Program Files\MySQL Server XYZ\bin\mysql.exe -hlocalhost -uroot -pascent

Apart from that, you should NEVER post any password in a public forum - that's totally dumb.
dogra_vj posted 9 years ago
Thanks for the prompt response...what I posted above was the information as per your earlier post posted on 09 Jan 10..so I am not sharing my detailssmileI fixed the problem by reinstalling the whole thing again saving my data files..I guess some thing was missing...now its working..Thanks for you help
DevinHeaven posted 9 years ago
I figured of the problem for those who are trying to make a WoW Private Server...

This NEEDS to be open while you are using it...

Go to Corruption Productions BlizzPack/Server/MySQL.exe (Or Windows Batch File)

As long as you have that open... Your SQL should work...

If it doesn't Message me on Youtube because I'm leaving this forum and I'm not coming back...
Youtube Username: Yournothawt
mjnoon88 posted 8 years ago
i get the same error i restart the server

bet it steel not working unhappyunhappyunhappy
t.mfazil posted 4 years ago
ERROR 2005 (HY000): Unknown MySQL server host 'ascent' (11001)

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