MySQL startup error - port is already in use
28,977
Solution 1
- open xampp control panel.
- click on "config" button.
- click on "service and port settings".
- click on "mysql" tab.
- change the value labeled "Main Port" to 3307
Solution 2
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.
Author by
Suyash Ranade
Updated on July 29, 2021Comments
-
Suyash Ranade almost 3 years
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...
-
Daan almost 9 yearsError pretty clear to me, clear up port 3306 or let MySQL run on a different port.
-
Joachim Isaksson almost 9 yearsLooks like you're trying to start MySQL when another MySQL is already running on the machine (using the same port).
-
-
Puneeth G R over 3 yearsIf you get access denied error, then make sure you right-click on xampp and click on "Run as Administrator".
-
Murtaza Haji over 3 yearsI have mariadb running already thats why port 3306 is in use, can I use 3307 to exposr mysql on that port?
-
Mayur Patel over 2 yearsThis worked for me. Thanks!