27

I'm getting the following errors when I launch XAMPP.

12:35:23 [main] Initializing Control Panel 12:35:23 [main] Windows Version: 64-bit 12:35:23 [main] XAMPP Version: 1.8.1 12:35:23 [main] Control Panel Version: 3.1.0 3.1.0 [ Compiled: September 20th 2012 ] 12:35:23 [main] Running with Administrator rights - good! 12:35:23 [main] XAMPP Installation Directory: "c:\xampp\" 12:35:23 [main] Checking for prerequisites 12:35:23 [main] All prerequisites found 12:35:23 [main] Initializing Modules 12:35:23 [Apache] XAMPP Apache Service is already running on port 80 12:35:23 [Apache] XAMPP Apache Service is already running on port 443 12:35:23 [mysql] MySQL Service detected with wrong path 12:35:23 [mysql] Change XAMPP MySQL settings or 12:35:23 [mysql] Uninstall/disable the other service manually first 12:35:23 [mysql] Found Path: "C:\Program Files\MySQL\MySQL Server 5.5\bin\mysqld" --defaults-file="C:\Program Files\MySQL\MySQL Server 5.5\my.ini" MySQL 12:35:23 [mysql] Expected Path: c:\xampp\mysql\bin\mysqld.exe --defaults-file=c:\xampp\mysql\bin\my.ini mysql 12:35:23 [mysql] Problem detected! 12:35:23 [mysql] Port 3306 in use by "mysqld.exe"! 12:35:23 [mysql] MySQL WILL NOT start without the configured ports free! 12:35:23 [mysql] You need to uninstall/disable/reconfigure the blocking application 12:35:23 [mysql] or reconfigure MySQL to listen on a different port 12:35:23 [main] Starting Check-Timer 12:35:23 [main] Control Panel Ready 

I wasn't able to find a proper solution on google, so I'm kinda' hoping someone could help me out with this.

Oh and, XAMPP is running properly. Apache and the MySQL service are both running ..

3
  • You have already MySQL process running in your machine. Try to disable the service in Services (Win+R -> services.msc and search a MySQL service). Commented Mar 30, 2013 at 12:53
  • But what MySQL process am I cancelling if I do so? As I actually want to keep it running for the sake of Apache .. - Sorry, I'm kinda' new to this. Commented Mar 30, 2013 at 16:16
  • You have a process running in the port 3306, and probably is another mysql process. You can try to remove it, or change the port of the mysql process in XAMPP. Commented Mar 30, 2013 at 18:38

12 Answers 12

99
  1. Go to cmd and run it with Administrator mode.
  2. Uninstall mysql service through command prompt using the following command.

     sc delete mysql 
  3. restart XAMPP

Sign up to request clarification or add additional context in comments.

4 Comments

After this you may need to follow through with Ton's procedure
It works like a charm. OP should mark this as accepted answer to help others to find the right solution.
Worked perfectly on Windows 10. I had already removed MySQL from the computer, but hadn't removed the service.
Worked for me as well on Windows 11, crazy
27

To delete existing service is not good solution for me, because on port 3306 run MySQL, which need other service. But it is possible to run two MySQL services at one time (one with other name and port). I found the solution here: http://emjaywebdesigns.com/xampp-and-multiple-instances-of-mysql-on-windows/

Here is my modified setting: Edit your “my.ini” file in c:\xampp\mysql\bin\ Change all default 3306 port entries to a new value 3308

edit your “php.ini” in c:\xampp\php and replace 3306 by 3308

Create the service entry - in Windows command line type

sc.exe create "mysqlweb" binPath= "C:\xampp\mysql\bin\mysqld.exe --defaults-file=c:\xampp\mysql\bin\my.ini mysqlweb"

Open Windows Services and set Startup Type: Automatic, Start the service

2 Comments

How do I change the defaults now for XAMPP Control Panel. It is still giving me the error: MyCQL WILL NOT Start without the configured ports free! Port 3306 in use by ""C:\Program Files\MySQL\MySQL Server 5.7\bin\mysqld.exe" --defaults-file="C:\ProgramData\MySQL\MySQL Server 5.7\my.ini" MySQL57"!
nevermind I figured it out. On the XAMPP control panel go to config -> service and port settings -> mysql -> change 3306 to 3308 -> save save save!
14

This is how I solved similar problem:

  1. Launch XAMPP Control Panel.
  2. Uninstall the MySQL service: click 'green check' button beside MySQL, under Service column. The 'green check' button will change into 'red cross' button.
  3. Exit XAMPP, and relaunch it again.
  4. Click Start.

I hope it can help solve your problem too.

1 Comment

Over 10 years later, still the answer that worked for me.
9

Firstly enter cmd.

Then write:

sc delete MySQL 

After that restart your computer. When restarting your computer and opening your xampp, you can see cross symbol on the MySQL. Click the cross symbol and click the start. That's all.

Comments

7

Set XAMPP controlpanel to run under Administrator priviledges.

In Win 7 1. First make sure XAMPP control panel is not running 2. SHIFT+right click on XAMPP Control Panel 3. Click on properties 4. In properties select tab 'Compatibility' 5. On bottom of the tab under 'Privilege level' check the box "Run this program as an administrator" 6. Click OK

this worked for me

1 Comment

In my system I was getting the error messages too although Apache was installed as a service. When I unchecked the box then checked it again, the error messages went away. I may have done the install-as-a-service outside of XAMPP which caused a conflict.
5

Ok so i found out the problem :)

ctrl+alt+delete to start task manager, once you get to task manager go to services. find MySQL and right click on it. Then click stop process. That worked for me and i hope it works for you :D

Comments

2

about this specific issue:

12:35:23 [mysql] Found Path: "C:\Program Files\MySQL\MySQL Server 5.5\bin\mysqld" --defaults-file="C:\Program Files\MySQL\MySQL Server 5.5\my.ini" MySQL 12:35:23 [mysql] Expected Path: c:\xampp\mysql\bin\mysqld.exe --defaults-file=c:\xampp\mysql\bin\my.ini mysql 

notice that .exe is missing from 1st row at the end of mysqld.

To fix this, start regedit.exe and change HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\mysql ImagePath by adding the .exe extension.

Restart xampp control panel and this error should not show up.

1 Comment

This is the hint that pointed me to a solution that worked for me. Check my solution below.
1

its because you probaly installed wamp server and uninstall it but wampmysql.exe still running and using the default mysql port go to msconfig under services tab uncheck wampmysqld to deactivate it reboot the computer should work

Comments

1
  • Ok it's very easy actually to solve this...most of you who are presented with this problem probably don't even realize you don't have the full software yet installed :) I tried looking online with little success except some1 mentioned you need to look for those services running already. Forexample problem with filezilla you look in task manager for filezilla and you stop the process then you click the X in the xampp control pannel to install filezilla and then click run and it should start the service normally showing you a green lite with a check mark.

  • Same goes for mysql issues.

  • As for the apache problem, it usualy is a problem with the port being overtaken by skype or some other program, but you can find info how to solve that on the net easily :)

Comments

1

This is how I solved mine, using mircea answer above.

From the error above, copy the mentioned Expected Path.

Start regedit.exe, go to HKEY_LOCAL_MACHINE then SYSTEM then CurrentControlSet then services then MySQL. Click ImagePath, Edit, Modify. Paste the Expected path copied from the above into the Value data field, Press OK, close regedit. Restart Xampp.

That is how it worked for me, for I'm having MSSQL server installed and running and didn't want to do away with it.

Comments

-1

In my case this issue caused because my local machine used to the one MySQL service installed earlier at 3006 port. Thus I modified both my.ini (C:\xampp\mysql\bin\my.ini) and php.ini (C:\xampp\php\php.ini) files replaced port 3006 to 3008

After that I've created a new service running the command described above by Tommer:

sc.exe create "mysqlweb" binPath= "C:\xampp\mysql\bin\mysqld.exe --defaults-file=c:\xampp\mysql\bin\my.ini mysqlweb"

Comments

-1

hello i have had same problem an i did the steps with tommer and the problem solved thank you

note :

you don't have to go to that like just do this ;

1)-- Edit your “my.ini” file in c:\xampp\mysql\bin\ Change all default 3306 port entries to a new value 3308

2)--edit your “php.ini” in c:\xampp\php and replace 3306 by 3308

3)--Create the service entry - in Windows command line type

sc.exe create "mysqlweb" binPath= "C:\xampp\mysql\bin\mysqld.exe --defaults-file=c:\xampp\mysql\bin\my.ini mysqlweb"

4)--Open Windows Services and set Startup Type: Automatic, Start the service

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.