Apache and MySql services are not running after XAMPP directory relocation

Applies to: Windows Operating Systems
This is common error when you relocate the XAMPP directory, your Apache and MySql services becomes stop. After refreshing the XAMPP through the setup_xampp.bat file, the problem does not solve.

The setup_xampp.bat file edit all the set up files including the .config files according to new location but it does not change the executable paths of the Apache and MySql service within the registry.

Errors shown in XAMPP control panel application:

Busy...
Error: Apache service not started [-1]
Busy...
Error: MySql service not started [-1]

There may be other condition and reasons of this error so you can verify the actual reason of the error from the Control Panel\All Control Panel Items\Administrative Tools\Services

Apache service is not running XAMPP

If you find that the executable path is wrong, this means the problem is due to wrong executable path. You can change the executable path from the Registry System(Please take a back up before the proceeding).

Follow the instructions:

1. Open your Registry System(Type the ‘regedit’ in the Run and press ‘enter’).
2. Expand the HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services.
3. For the back up: File\Export.
4. Find the service (Apache2.2, in my case). Locate the ImagePath sub key and change that value with correct value.
5. Repeat the step 4 for the MySql Service.
6. Now try to start the services from the XAMPP control panel application.

Hope your problem will be solved. If you have any problem, let me know.

  • Ankur

    My exe path is correct but still not able to Start service.

    Please suggest.

    Thanks
    Ankur

    • Try to run the service from Control PanelAll Control Panel ItemsAdministrative ToolsServices.

      and let me know the error description