Home mysql Question on MySQL Server 5.5 - Error Error 2003 (HY000): CAN't Connect...

Question on MySQL Server 5.5 – Error Error 2003 (HY000): CAN’t Connect to MySQL Server On ‘Localhost’ (10061)

Author

Date

Category

On one PC (MySQL server went to Pack from Denwer – MySQL version 5.5)
I open mysql.exe there, it immediately works. The MYSQL console opens
On another PC installed MySQL from MySQL Installer Community package (Official MySQL Server Installer)
On it when opening the MySQL.exe file immediately error.
I tried through the command: mysql.exe -uroot -p [password] . The same mistake:
MySQL Server 5.5, Error: Error 2003 (HY000): CAN't Connect to MySQL Server On 'Localhost' (10061)
Although the MySQL server itself works. Bases open, edit yourself.
With the console MySQL experience is not.
How to fix it?
And why in one case the console works, and not in the other?


Upd:
If you specify:
mysql.exe -uroot -p [password] --host = localhost – then the same (Egog 2003).
And if:
mysql.exe -uroot -p [password] --host = 127.0.0.1 – then the console is connected and the console opens.


Answer 1, Authority 100%

Typically, any console application if it does not specify the arguments when started, it starts with the default arguments. What in your case and happens – the client is trying to connect to the database on the local computer, which you do not have.
As a rule, console applications provide certificate for possible arguments. For this, there are standard arguments -? -h / h -help
Use the command to connect to the remote server.
mysql --host = hostname --user = mYNAME , where hostname is the name of the computer with the database or its IP address

Programmers, Start Your Engines!

Why spend time searching for the correct question and then entering your answer when you can find it in a second? That's what CompuTicket is all about! Here you'll find thousands of questions and answers from hundreds of computer languages.

Recent questions