MySQL startup error - port is already in use

28,977

Solution 1

  1. open xampp control panel.
  2. click on "config" button.
  3. click on "service and port settings".
  4. click on "mysql" tab.
  5. 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.

Share:
28,977
Suyash Ranade
Author by

Suyash Ranade

Updated on July 29, 2021

Comments

  • Suyash Ranade
    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
      Daan almost 9 years
      Error pretty clear to me, clear up port 3306 or let MySQL run on a different port.
    • Joachim Isaksson
      Joachim Isaksson almost 9 years
      Looks like you're trying to start MySQL when another MySQL is already running on the machine (using the same port).
  • Puneeth G R
    Puneeth G R over 3 years
    If you get access denied error, then make sure you right-click on xampp and click on "Run as Administrator".
  • Murtaza Haji
    Murtaza Haji over 3 years
    I have mariadb running already thats why port 3306 is in use, can I use 3307 to exposr mysql on that port?
  • Mayur Patel
    Mayur Patel over 2 years
    This worked for me. Thanks!