Bobcares

“MySQL service detected with wrong path” – 2 easy ways to fix this error

by | Jan 30, 2019

MySQL errors can sometimes be clueless.

Especially, when there are no pointers to the reason in the error message. One such error is “MySQL service detected with wrong path“.

Server owners properly configure MySQL service on the server, but still receive a message like “MySQL service detected with wrong path“.

At Bobcares, we help server owners resolve such complex MySQL errors as part of our Server Management Services to our customers.

Today, we’ll discuss the top 2 reasons for this error and how we fix them.

 

MySQL service detected with wrong path – What this means?

“MySQL service detected with wrong path” is a common error seen on Windows systems. And, users see this error when trying to start multiple instances of MySQL service on the server.

For example, XAMPP is a software distribution which provides Apache web server, MySQL database, PHP and Perl. So, this can sometimes conflict with the default MySQL service on the server and throws this error.

And, users see the complete error message like this:

21:01:50 [mysql] MySQL Service detected with wrong path
21:01:50 [mysql] Change XAMPP MySQL and Control Panel settings or
21:01:50 [mysql] Uninstall/disable the other service manually first

 

MySQL service detected with wrong path –  Causes and Fixes

Now, let’s see the main reasons for this error and how our MySQL Experts fix them.

1) Multiple instances of MySQL service

Multiple instances of MySQL service running on the same server is one of the common reasons for this error “MySQL service detected with wrong path”

For example, we’ve seen instances in which users receive this error when trying to install the XAMPP application that has a built in MySQL database service.

In other words, if the customer has already installed an external MySQL installation(which is not part of XAMPP), these MySQL instances conflict and result in this error.

The reason is that MySQL listens on port 3306 by default. And, if multiple MySQL instances are active on the server, everyone tries to use this default port. But, only one can connect at a time.

 

How we fix?

Firstly, our Support Engineers analyze the applications running on the server. If the customer only uses applications such as XAMPP that have their own web server and database, we uninstall the default MySQL instance using the below command.

sc delete mysql

 

After that, we run XAMPP in administrator mode and install MySQL service to the XAMPP interface.

Alternatively, some customers require both MySQL services. In such cases, our Support Engineers set up the existing or new MySQL instance to use another port.

For example in XAMPP, we edit my.ini file in c:\xampp\mysql\bin\ and change all default port 3306 entries to a new value. In addition to that, we edit the mysql.default_port parameter in c:\xampp\php\php.ini to the new custom port.

Finally, we add the Windows Registry entry and restart the service.

2) Wrong MySQL service path

Similarly as the error suggests, incorrect MySQL service path name on the server may lead to this error.

We’ve seen cases where users uninstall default MySQL service and replace it with services like XAMPP on the server. However, the server still has this default MySQL service listed in the Windows services list with the old path name.

 

How we fix?

In such cases, our Hosting Engineers correct the path name of the active MySQL service. For example in Windows servers, we update the MySQL path name under ImagePath parameter in HKEY_LOCAL_MACHINE > SYSTEMS > CurrentControlSet > Services > MySQL.

For instance in XAMPP, we update the MySQL path name as given below.

"c:\xampp\mysql\bin\mysqld.exe" --defaults-file="c:\xampp\mysql\bin\my.ini" MySQL

 

Most importantly, we save the changes in the registry and restart the MySQL service to bring these changes into effect.

[And, do you need a Server Expert to look into this error? Click here, and get one of our experienced MySQL Experts to fix this problem.]

 

Conclusion

In short, MySQL service detected with wrong path error can occur due to wrong MySQL service path name set on the server, multiple instances of MySQL service running on the server. Today, we’ve discussed these reasons in detail and how our Server Experts fix them.

PREVENT YOUR SERVER FROM CRASHING!

Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.

SEE SERVER ADMIN PLANS

var google_conversion_label = "owonCMyG5nEQ0aD71QM";

2 Comments

  1. yadnesh ingole

    I have already installed mysql on my system but when i installed xammp mysql needs to be installed again but showing errors while starting the mysql on xampp i have changed the port no as well but now its showing the wrong path of mysql basically showing the path of mysql i have already installed so how should i changed the path of xammp mysql

    Reply
  2. Anurag sinha

    In 2nd method where he referred changing the path there he mentioned windows server. You need to type “Registry Editor” application in windows search.

    Reply

Submit a Comment

Your email address will not be published. Required fields are marked *

Never again lose customers to poor
server speed! Let us help you.