How can I get mysql server to work in xampp? - php

I have recently installed xampp in windows 7. When I try to run Mysql I get the following error:
Error: MySQL shutdown unexpectedly.
12:27:51 PM [mysql] This may be due to a blocked port, missing dependencies,
12:27:51 PM [mysql] improper privileges, a crash, or a shutdown by another method.
12:27:51 PM [mysql] Press the Logs button to view error logs and check
12:27:51 PM [mysql] the Windows Event Viewer for more clues
12:27:51 PM [mysql] If you need more help, copy and post this
12:27:51 PM [mysql] entire log window on the forums
Within my.ini I have changed the port from 3306 to 3307 because I have a different mysql server 5.6.19 running in my computer as well. But still i get the same error. Please can anyone help me???? I also uninstalled Xampp and installed it again :(.

Just fixed this same issue not 10 minutes ago.
Open XAMPP
Click on Config
Click on Service and Port Settings
Click MySQL tab
Change Main Port
Click Save
Then restart the MySQL service

Experienced this before try to close all your chatting program like skype and etc. cause it uses the same port as xampp port 80, after closing now you can re-open it after running xamp

I had a similar problem before and the only solution I found was to use an older version of XAMPP. I'm not at my home PC at the moment and can't give you the exact version that worked for me at this moment, but I will post it in the comments later if it helps (my best guess is 1.7.5).
In the meantime, if you are using the newest version of XAMPP you might try an older version.

Related

Trying to get a basic PHP-based app with a MySQL database running, having issues with the database port in XAMPP

I'm making a very basic web app with PHP and a MySQL database. I am able to get Apache running on the default ports 80,443, but when I try to connect to my database using the default port 3306, XAMPP reports the following error:
Status change detected: stopped
10:40:02 AM [mysql] Error: MySQL shutdown unexpectedly.
10:40:02 AM [mysql] This may be due to a blocked port, missing dependencies,
10:40:02 AM [mysql] improper privileges, a crash, or a shutdown by another method.
10:40:02 AM [mysql] Press the Logs button to view error logs and check
10:40:02 AM [mysql] the Windows Event Viewer for more clues
10:40:02 AM [mysql] If you need more help, copy and post this
10:40:02 AM [mysql] entire log window on the forums
I've tried switching the port to 3307 and that allows me to connect, but it can no longer find the database I'm trying to connect to. Has anyone encountered this issue before?

error in apache starts xampp version 5.6.30

Good Morning!
Dear php master how do I fix this error? This happened on a laptop where I have installed x.ampp version 6.5.30, the following mistakes:
Error: Apache shutdown unexpectedly.
This may be due to a blocked port, missing dependencies,improper privileges, a crash, or a shutdown by another method.
Press the Logs button to view error logs and check the Windows Event Viewer for more clues.
If you need more help, copy and post this entire log window on the forums.
Thanks in advance.

Xampp server MySQL error ? Status of MySQL database - DEACTIVATED

I Installed Latest XAMPP server when I start its running in local host its running ,
and also i Installed Drupal and MySQL 6.1 ,.
after installing Drupal i can access to localhost/drupal and here Entire Database is saved to MySQL 6.1,.
But in XAMPP at the part of MySQL here its I am Getting Error like
6:33:47 PM [mysql] Attempting to start MySQL app...
6:33:47 PM [mysql] Status change detected: running
6:33:48 PM [mysql] Status change detected: stopped
6:33:48 PM [mysql] Error: MySQL shutdown unexpectedly.
6:33:48 PM [mysql] This may be due to a blocked port, missing dependencies,
6:33:48 PM [mysql] improper privileges, a crash, or a shutdown by another method.
6:33:48 PM [mysql] Press the Logs button to view error logs and check
6:33:48 PM [mysql] the Windows Event Viewer for more clues
6:33:48 PM [mysql] If you need more help, copy and post this
6:33:48 PM [mysql] entire log window on the forums
and at status I am Getting this status,.
how to run this in xampp
Try to delete the ibdata1 file in C:\xampp\mysql\data directory
Make sure you exit xampp first and than restart it.
if you install a mysql server separate from xampp, which it sounds like you did, then you'll have issues using xampp to manage it. basically, xampp is trying to start the mysql that came bundled with it, but can't because you already have a service running on that port.
this may help you be able to manage your installation from the phpmyadmin panel.
Using XAMPP- phpmyadmin while Having Separate MYSQL installation
personally, i use xampp for my application server, and use mysql workbench for managing the database
http://dev.mysql.com/downloads/tools/workbench/
edit: also, even though xampp is telling you mysql is stopped, it probably isn't. if you're in windows, check the task manager's services tab and see if mysql is running there. it probably is, and you just need to reconfigure the admin panel to manage that instance instead of using the one that came with xampp

mysql database is not working in xampp 1.8.3

i am using xampp 1.8.3 on windows 7. when i restart mysql from xampp control panel. it shows
1:33:10 PM [mysql] Error: MySQL shutdown unexpectedly. 1:33:10 PM
[mysql] This may be due to a blocked port, missing dependencies,
1:33:10 PM [mysql] improper privileges, a crash, or a shutdown by
another method. 1:33:10 PM [mysql] Press the Logs button to view
error logs and check 1:33:10 PM [mysql] the Windows Event Viewer
for more clues 1:33:10 PM [mysql] If you need more help, copy and
post this 1:33:10 PM [mysql] entire log window on the forums
then i delete xampp/mysql/data/ibdata1 file and mysql starts.but my database tables have dropped already and i can only view database name with no tables. if i want to remove database i got
#1010 - Error dropping database (can't rmdir '.\key', errno: 41).
every time i have to create new database for run my program.please help.
Microsoft Windows include a firewall which specifically blocks ports. If you plan on using MySQL through a network port then you should open and create an exception for this port before performing the installation. To check and if necessary add an exception to the firewall settings:
First ensure that you are logged in as an Administrator or a user with Administrator privileges.
Go to the Control Panel, and double click the Windows Firewall icon.
Choose the Allow a program through Windows Firewall option and click
the Add port button.
Enter MySQL into the Name text box and 3306 (or the port of your
choice) into the Port number text box.
Also ensure that the TCP protocol radio button is selected.
If you wish, you can also limit access to the MySQL server by
choosing the Change scope button.
Confirm your choices by clicking the OK button.
Additionally, when running the MySQL Installation Wizard on Windows 7 or newer, ensure that you are logged in as a user with administrative rights.
You can read further here:
Installing MySQL on Microsoft Windows
Connecting to MySQL Remotely from Windows with SSH
First I uninstall xampp setup and also removed all the files from xampp directory. Please be sure to make a copy of xampp/htdocs folder to store your existing files. Also copy mysql/data folder contents, Since all databases are stored in that folder. After that I re-install xampp setup and restart my PC and now everything is working fine.
This is common issue we are facing during installation of xampp.
Simple solution check installed port then check in service list there is one service running named mysqld , you have to find it and kill it. and restart mysql.
Now you will find mysql start running.
Let me know if still you facing any issue.

XAMPP won't start apache

I need to set up a local php server and downloaded XAMPP version 3.2.1 for windows. The installation finished without error messages and the control panel starts just fine. MySQL runs without problems but apache won't start.
The error message says:
12:17:01 [Apache] Attempting to start Apache app...
12:17:01 [Apache] Status change detected: running
12:17:02 [Apache] Status change detected: stopped
12:17:02 [Apache] Error: Apache shutdown unexpectedly.
12:17:02 [Apache] This may be due to a blocked port, missing dependencies,
12:17:02 [Apache] improper privileges, a crash, or a shutdown by another method.
12:17:02 [Apache] Press the Logs button to view error logs and check
12:17:02 [Apache] the Windows Event Viewer for more clues
12:17:02 [Apache] If you need more help, copy and post this
12:17:02 [Apache] entire log window on the forums
I tried various ports, apache still doesn't start. I started the control panel as administrator - I am logged into the administrator account on this machine, but there's this extra button "start as administrator"- . It doesn't work.
Unfortunately the error logs are not created. The control panel complains that it couldn't find the appropriate files, should they be created ? I clicked yes and tried to start apache again. Same error message, now the error logs are found but they are still empty.
I searched for similar problems and found this question: Apache in XAMPP won't start
The accepted answer recommends to close the windows services "WebClient" and "Web Deployment Agent Service". I've disabled "WebClient" but "Web Deployment Agent Service" is not installed. Sounds like VisualStudio which I don't have on this machine.
My guess is that my apache installation is not sane. Probably misses some dependencies. How can I check this ?
UPDATE:
It seems that although I changed the configuration files, apache still tried to run on port 80. And this port was indeed blocked by Skype. After closing skype, apache ran fine. And it was available on localhost:80 despite the fact that I definitely specified another port in the config file. #steven if you made your comment into an answer, i would accept it.
There are several reason that can cause this issue.
Skype:- Skype run on port 80 and 443 which can be a reason that block port 80 and 443 for Apache. you don't need to uninstall Skype. you can use following step if you installed Skype in your Machine.
Quit Skype before running Apache so if Skype can release port 80 and 433.
Go to Skype Tools-> options -> Advanced -> Connection and unchecked port 80 after this you need to restart your skype and try to run the xampp now it'll not throw any issue as port 80 and 443 is free to use
IIS Server:- If your Machine have IIS Server enable so this is also a problem for you because IIS server also use port 80 and 443.
Go to start Menu type Internet Information Services select this and stop it's service which will release port 80 and 443.
I got the same problem, but I finally solved it.
Have you checked your firewall?
Are any XAMPP applications and services excepted?
Then, make sure Skype is uninstalled or blocked. This application uses the ports 80 and 443.
For me, Skype wasn't the problem, but iTunes! I figured out that iTunes uses the ports 80 and 443 as well. If it still doesn't help, try installing Apache manually.
open your command prompt (run as administrator) and write the following code and hit enter
net stop w3svc
and then open your xampp and run apache server
if you want to start your w3svc
then execute this code
net start w3svc
NOTE : stopping w3svc won't lead to any problems
NOTE : Don't forget to run cmd as administrator
After checking my config files, running "net stop http" in the command line, as well as spending about 30 minutes trying to download a version of Skype that is no longer supported in order to release my ports...
What worked for me is that I needed to create an SSL certificate. I found this under xampp/apache/conf/ssl.cert directory. (Make sure to save the certificate in the "Trusted Root Certification Authorities" store when prompted). Once going through that prompt, and successfully creating the certificate. Apache began running again like normal.

Categories