MySQL启动错误-端口已被使用

Suy*_*ade 2 php mysql apache xampp

我在尝试启动 XAMPP 时收到以下错误:

12:34:26 PM  [mysql]    Attempting to start MySQL service...
12:34:38 PM  [mysql]    Problem detected!
12:34:38 PM  [mysql]    Port 3306 in use by ""C:\Program Files\MySQL\MySQL Server 5.1\bin\mysqld" --defaults-file="C:\Program Files\MySQL\MySQL Server 5.1\my.ini" MySQL"!
12:34:38 PM  [mysql]    MySQL WILL NOT start without the configured ports free!
12:34:38 PM  [mysql]    You need to uninstall/disable/reconfigure the blocking application
12:34:38 PM  [mysql]    or reconfigure MySQL and the Control Panel to listen on a different port
12:34:38 PM  [mysql]    Attempting to start MySQL service...
Run Code Online (Sandbox Code Playgroud)

Car*_*los 5

日志明确指出另一个应用程序正在侦听端口 3306,因此无法启动 MySQL,因为 3306 是为其配置的端口(MySQL 连接的默认端口)。这个已经监听 por 3306 的应用程序是另一个可能配置为自动启动的 MySQL 实例。

如果您使用的是 Windows,请单击Start按钮,然后单击Execute,然后services.msc键入并按[Enter]。查找正在运行的 MySQL 服务,停止它,并配置它以防止其在系统启动时启动。之后您应该可以正常启动 XAMPP。