Resolving "Can't Connect to MySQL Server on 'localhost' (10061)" Error
Upon encountering the error "Can't connect to MySQL server on 'localhost' (10061)" while configuring MySQL 5 on Windows 2003, several measures can be taken to address the issue.
One potential cause is a firewall exception for 'MySQL Server' on port 3306. To verify this, check the firewall configuration and ensure that the exception is in place.
Another common reason for this error on Windows is that the mysqld.exe service is not running. To rectify this, open the command prompt and execute the command "C:Program FilesMySQLMySQL Server 5.5binmysqld" --install. This will add MySQL to the list of Windows services.
Subsequently, open Services (services.msc) and locate the MySQL service. Start the service and the MySQL server will become operational. Once this is done, you should be able to connect to the MySQL server without encountering the "Can't connect" error.
The above is the detailed content of Why Can't I Connect to MySQL Server on 'localhost' (10061)?. For more information, please follow other related articles on the PHP Chinese website!