MySQL startup error - port is already in use

微笑、不失礼 提交于 2020-07-31 05:08:09

问题


I get the following error while trying to start 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...

回答1:


The log cleraly states that another application is listening on port 3306, so it is not possible to start MySQL since 3306 is the configured port for it (default port for MySQL connections). This application that already listens on por 3306 is another instance of MySQL that's probably configured to start automatically.

If you are using Windows, click the Start button, then Execute, then type services.msc and press [Enter]. Look for the running MySQL service, stop it, and configure it to prevent its launching on system startup. After that you should start XAMPP normally.




回答2:


So, mysql is listening 3306 port by default. According to your error,some service has already used it.

Depends on your OS,check who are using it. For example for netstat -lp | grep 3306, you can close this service and restart your mysql or change to another port OR you an change mysql default port to listen in your my.cnf file.



来源:https://stackoverflow.com/questions/31239711/mysql-startup-error-port-is-already-in-use

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!