wrong path found of mysql in xampp server - php

As I start XAMPP server it gives me following status:
21:19:49 [mysql] MySQL Service detected with wrong path
21:19:49 [mysql] Change XAMPP MySQL and Control Panel settings or
21:19:49 [mysql] Uninstall/disable the other service manually first
21:19:49 [mysql] Found Path: "C:\Program Files (x86)\MySQL\MySQL >>>Server 5.1\bin\mysqld" --defaults-file="C:\Program Files (x86)\MySQL\MySQL >>>Server 5.1\my.ini" MySQL
21:19:49 [mysql] Expected Path: c:\xampp\mysql\bin\mysqld.exe >>--defaults-file=c:\xampp\mysql\bin\my.ini mysql
Well, I deleted that MySQL Server 5.1. I restarted the XAMPP server but still it is giving me the same error.
What should I do to make it right?

Related

Apache Service detected with wrong path(xampp)

I have xampp on my C Drive and it was deleted from my computer, i tried to install it again on the C drive but i failed, so i ended up installing it on my E drive.
And when i open it it gives me this error messages.
2:52:51 AM [Apache] Apache Service detected with wrong path
2:52:51 AM [Apache] Change XAMPP Apache and Control Panel settings or
2:52:51 AM [Apache] Uninstall/disable the other service manually first
2:52:51 AM [Apache] Found Path: "C:\xampp\apache\bin\httpd.exe" -k runservice
2:52:51 AM [Apache] Expected Path: "e:\xampp\apache\bin\httpd.exe" -k runservice
2:52:51 AM [mysql] MySQL Service detected with wrong path
2:52:51 AM [mysql] Change XAMPP MySQL and Control Panel settings or
2:52:51 AM [mysql] Uninstall/disable the other service manually first
2:52:51 AM [mysql] Found Path: C:\xampp\mysql\bin\mysqld.exe --defaults-file=c:\xampp\mysql\bin\my.ini mysql
2:52:51 AM [mysql] Expected Path: e:\xampp\mysql\bin\mysqld.exe --defaults-file=e:\xampp\mysql\bin\my.ini mysql
2:52:51 AM [mysql] Problem detected!
2:52:51 AM [mysql] Port 3306 in use by "C:\xampp\mysql\bin\mysqld.exe --defaults-file=c:\xampp\mysql\bin\my.ini mysql"!
2:52:51 AM [mysql] MySQL WILL NOT start without the configured ports free!
2:52:51 AM [mysql] You need to uninstall/disable/reconfigure the blocking application
2:52:51 AM [mysql] or reconfigure MySQL and the Control Panel to listen on a different port
I'm not an expert but if I was in your situation I would listen to what te log says..
1- Easy but pain in the ass for further configuration: Change the port in your E: configurations files of mysql etc...
2- Try to delete the path that your log is seeing for the older installation also check if you can modify the mysql service that is running on port 3306 or delete that service too (it should be re-configured) the next time you'll start XAMPP. Don't forget to restart your php and mysql if you try this..
3- Easiest: delete/uninstall both of your XAMP path location and every mysql service that might run and do a complete instalatio again for XAMPP...
ps: Sorry for the format of that text I never comment on stackoverflow my bad ;)

MySQL won't start on xampp (Windows)

This problem started when I didn't properly hibernate my laptop. Every time I open xampp, I can't start MySQL. I searched for online answers but nothing happened. I tried changing the port from 3306 to 3307 to 80, still nothing happened.
So I uninstalled xampp and install it again. After installing, I tried to start Apache and MySQL. Worked fine with Apache but on MySQL, I got this error log:
4:52:15 PM [mysql] Error: MySQL shutdown unexpectedly.
4:52:15 PM [mysql] This may be due to a blocked port, missing dependencies,
4:52:15 PM [mysql] improper privileges, a crash, or a shutdown by another method.
4:52:15 PM [mysql] Press the Logs button to view error logs and check
4:52:15 PM [mysql] the Windows Event Viewer for more clues
4:52:15 PM [mysql] If you need more help, copy and post this
4:52:15 PM [mysql] entire log window on the forums
It's usually because of Skype (or any other program that uses MySql port). Go to Skype Options > Advanced > Connection type in alternative port (e.g. 42795) and uncheck "Use port 80 and 443..."

MySQL startup error - port is already in use

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...
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.
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
So, mysql is listening 3306 port by default. According to your error,some service has already used it.
Depends on your OS,check who are using it. For example for netstat -lp | grep 3306, you can close this service and restart your mysql or change to another port OR you an change mysql default port to listen in your my.cnf file.
may be you have previously installed xampp app and left in before complete installation and then reinstalled it before uninstalling previous one just uninstall privious one or uninstall both and reinstall
Well my friend told me to reinstall xampp in C drive and it did worked but after some time i was facing same problem again so i followed this steps hope it will be helpfull.
Open cmd as administrator
If there's nothing important running on port number 3306 kill that process.
enter image description here
Follow this steps:
(In case photo have any error)
after opening cmd as administer run command
netstat -ano |findstr 3306
Then observe the PID at last column if there is only one process running shut it down.
taskkill /F /PID portidnumber
In case you get error even after doing that try to do follow the steps here:
I experienced that if we try to stop mysql before apache it is giving error.
So when you go to stop process or server stop apache first and then mysql.
And don't shutdown xampp without stopping any server
(I found this by web search and some try and error and it's working for me at least)

Unable connect to MySql in Xampp server

here I am trying to connect mysql in xampp server but getting this message again and again.... I am able to connect apache.
Problem detected!
11:59:20 PM [mysql] Port 3306 in use by ""C:\Program Files (x86)\MySQL\MySQL Server 5.1\bin\mysqld" --defaults-file="C:\Program Files (x86)\MySQL\MySQL Server 5.1\my.ini" MySQL"!
11:59:20 PM [mysql] MySQL WILL NOT start without the configured ports free!
11:59:20 PM [mysql] You need to uninstall/disable/reconfigure the blocking application
11:59:20 PM [mysql] or reconfigure MySQL and the Control Panel to listen on a different port
11:59:20 PM [mysql] Attempting to start MySQL service...
Please help me. Thanks in advance.

XAMPP - MySQL shutdown unexpectedly

I installed XAMPP on Windows 8 (64bit). In XAMPP Control Panel i can't start mySQL. I changed the port of mySQl in "C:/xampp/mysql/bin/my.ini" from 3306 to 3307 according to that link:
xampp MySQL does not start
now the code in "my.ini" changed to:
[client]
# password = your_password
port = 3307
socket = "C:/xampp/mysql/mysql.sock"
# Here follows entries for some specific programs
# The MySQL server
[mysqld]
port= 3307
socket = "C:/xampp/mysql/mysql.sock"
Now it still gives that error:
11:31:48 AM [mysql] Attempting to start MySQL service...
11:31:56 AM [mysql] Status change detected: running
11:32:01 AM [mysql] Status change detected: stopped
11:32:01 AM [mysql] Error: MySQL shutdown unexpectedly.
11:32:01 AM [mysql] This may be due to a blocked port, missing dependencies,
11:32:01 AM [mysql] improper privileges, a crash, or a shutdown by another method.
11:32:01 AM [mysql] Press the Logs button to view error logs and check
11:32:01 AM [mysql] the Windows Event Viewer for more clues
11:32:01 AM [mysql] If you need more help, copy and post this
11:32:01 AM [mysql] entire log window on the forums
I deleted "ibdata1" file in "C:\xampp\mysql\data".
also stopped mysql56 service.
Any help is appreciated. Thanks
Check the error logs to view more details on the subject. Check that mysql and mysqli port options in my.ini and php.ini and in config.inc.php match and are 3307.
In case MySQL Server has crashed you might want to take a look at Forcing InnoDB Recovery
In addition take also a look at this solution in case it is a 3rd party software issue.
Just like #Peter said, you need to change that file configuration.
Try to change this in your xampp folder ex: C:\xampp\php\php.ini:
mysql.default_port=3307
mysqli.default_port=3307
And change this parameter in your xampp folder ex: C:\xampp\mysql\bin\my.ini :
[client]
# password = your_password
port = 3307
socket = "C:/xampp/mysql/mysql.sock"
[mysqld]
port= 3307
To fix this issue,
Right click and open task manager
kill process "mysqld".
Open Xampp and start MySQL.
This really works!!
References:
https://www.youtube.com/watch?v=jcaqDv0f8K4
Just open task manager and forcefully end the task named mysqld.exe. And then try once again.

Categories