mysql database is not working in xampp 1.8.3 - php

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.

Related

is there a way to work with php and mysql just by using notepad++ and mysql server 5.0?

i had previously installed xammp and phpstorm but they show this error-
18:05:38 [mysql] Problem detected!
18:05:38 [mysql] Port 3306 in use by ""C:\Program Files (x86)\MySQL\MySQL Server 5.0\bin\mysqld-nt" --defaults-file="C:\Program Files (x86)\MySQL\MySQL Server 5.0\my.ini" MySQL"!
18:05:38 [mysql] MySQL WILL NOT start without the configured ports free!
18:05:38 [mysql] You need to uninstall/disable/reconfigure the blocking application
18:05:38 [mysql] or reconfigure MySQL and the Control Panel to listen on a different port
18:05:38 [mysql] Attempting to start MySQL service...
i have read every possible solution on stackoverflow, tried every possible solution but the problem still persists. even myphpadmin shows connection error.
i will be making my first php project( with database connectivity), so kindly tell me the connection code as i want to code in notepad++ using just mysql server 5.0
If you have uninstalled MySql Server 5.0 , uninstall Xampp too. And restart the Computer and again reinstall Xampp. With Xampp you can use PhpMyAdmin. So , I think no need to install MySql Server again. But , If you want you can Install.
If you are doing your First PHP Project , I think it's good to use MVC Structure. You can use MVC to Data Insert , View , Update , Delete and Login. And when you create Login , you should make with Sessions. Otherwise , anyone can access that page without login.
And there is one more thing. There are MySql and MySqli. Both are same. But , latest one is MySqli. So , you should make your Project with MySqli. If you use MySql you can run that Project on the Localhost without any trouble. But , when you Upload your Project to a Server , there are errors like this below picture. But , if you use MySqli you can run Project on Localhost and Server without any trouble.
just like the error says, there's an executable file in C:\Program Files (x86)\MySQL\MySQL Server 5.0\bin\ named mysqld-nt already using the ports that your mysql server is configured to use! thus, either reconfigure your mysql server to use different ports, or get rid of C:\Program Files (x86)\MySQL\MySQL Server 5.0\bin\mysqld-nt before starting your mysql server. it's been a while since i used xampp, but i think the mysql configuration file for xampp is in C:\xampp\mysql\my.cnf by default. or if you're having problems deleting C:\Program Files (x86)\MySQL\MySQL Server 5.0\bin\mysqld-nt, check out LockHunter: https://lockhunter.com/index.htm

MySql stops automatically

I Get This Error Message
Error: MySQL 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
It looks like you already have mysql running from different distribution (appserv) on the same port (3306).
You are inside a XAMPP control panel. which is different Windows LAMP distribution (xampp) which cannot start/stop appserv's mysql server instance.
IMHO you should pick one and uninstall other.
You should try have a look on this post, the MySQL port (3306) is in use or blocked:
Xampp and MySQL not started
You can try running this in command shell:
netstat -b -p TCP
Look for the results under local address. It will be something like 'localhost:3306'. It will list the port and the applications using it. Check the application that is listed for 3306

Unable to access MySql db

I have been working on php for some time. I have cloned a git repo yesterday. Just after that i am able to connect to MySQL server, access MySQL db and phpmyadmin properly. Today, I started the server and tried to access phpmyadmin from xampp control panel, as soon as I try to open it, apache port is changing automatically to 49868 and mysql connection terminates.Then, again apache changes its ports to previous states.
Any help is appreciated. Thanks in advance.
EDIT : I reinstalled everything and it worked.
Check if another application is using port 80.
In command prompt use:
netstat -aon | findstr :80
enter image description here
If windows verify if in task manager is already running XAMPP.

How can I get mysql server to work in xampp?

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.

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

Categories