Home > Database > Mysql Tutorial > body text

Why Can't I Connect to MySQL Server on 'localhost' (10061)?

DDD
Release: 2024-11-11 20:06:03
Original
207 people have browsed it

Why Can't I Connect to MySQL Server on 'localhost' (10061)?

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!

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template