Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't connect to MySQL server on 'localhost' (10061) after Installation

I installed MySQL using mysql-installer-5.5.20.0.msi on Windows 7. From the cmd window, I run "mysqlshow -u root -p". It asked for a password, then returned this error: "Can't connect to MySQL server on 'localhost' (10061)" This is a bad indication of partially failed/successful installation.

After reading the page, http://dev.mysql.com/doc/refman/5.5/en/windows-troubleshooting.html, it told me to find an error log (.err) in C:\Program Files\MySQL\MySQL Server 5.5\data. The directory exists but there is no log file.

I have a feeling this is related to the tight security of Windows 7, especially when installing a Unix based software. And yes, I am the Administrator on my PC.

Any help or suggestions is appreciated. And I can return a favor by answering Java and SQL query questions.

like image 519
The Original Android Avatar asked Jun 05 '12 06:06

The Original Android


People also ask

Can't connect to server on localhost 10061?

The error (2003) Can't connect to MySQL server on ' server ' (10061) indicates that the network connection has been refused. You should check that there is a MySQL server running, that it has network connections enabled, and that the network port you specified is the one configured on the server.

Can't connect to MySQL server on localhost 3306 10061 No connection could be made because the target machine actively refused it?

The error above means that your request to connect to the MySQL server has been refused. There are two things you need to check to fix this error: Make sure that your MySQL service is actually running. Check that you are attempting to connect to the right port number.

Can't connect to server on localhost?

What Is the Localhost Refused to Connect Error? The localhost simulates a web server running on your computer. When the “localhost refused to connect” error appears, it is likely due to misconfigured port. Other common reasons include insufficient permissions and the Apache webserver not running properly.


1 Answers

Please Try the following steps:

  1. c:\mysql\bin>mysqld --install
  2. c:\mysql\bin>mysqld --initialize

then press "Windows key + R" write "services.msc", run as admin

start MySQL service.

like image 163
maheshDeshmukh Avatar answered Sep 17 '22 14:09

maheshDeshmukh