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?
If you specify:
mysql.exe -uroot -p [password] --host = localhost – then the same (Egog 2003).
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
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