13

I installed xampp in windows XP. I am able to start apache and tomcat. But when I start mysql, it gets started but stops after five seconds.

So, I am not able to work with PHPMyAdmin.

I checked the mysql_error file inside xampp/mysql/bin and the following was present.

120320 11:48:44 [Note] Plugin 'FEDERATED' is disabled.
120320 11:48:44 InnoDB: The InnoDB memory heap is disabled
120320 11:48:44 InnoDB: Mutexes and rw_locks use Windows interlocked functions
120320 11:48:44 InnoDB: Compressed tables use zlib 1.2.3
120320 11:48:45 InnoDB: Initializing buffer pool, size = 16.0M
120320 11:48:45 InnoDB: Completed initialization of buffer pool
InnoDB: The first specified data file C:\xampp\mysql\data\ibdata1 did not exist:
InnoDB: a new database to be created!
120320 11:48:45  InnoDB: Setting file C:\xampp\mysql\data\ibdata1 size to 10 MB
InnoDB: Database physically writes the file full: wait...
120320 11:48:45  InnoDB: Log file C:\xampp\mysql\data\ib_logfile0 did not exist: new to be created
InnoDB: Setting log file C:\xampp\mysql\data\ib_logfile0 size to 5 MB
InnoDB: Database physically writes the file full: wait...
120320 11:48:45  InnoDB: Log file C:\xampp\mysql\data\ib_logfile1 did not exist: new to be created
InnoDB: Setting log file C:\xampp\mysql\data\ib_logfile1 size to 5 MB
InnoDB: Database physically writes the file full: wait...
InnoDB: Doublewrite buffer not found: creating new
InnoDB: Doublewrite buffer created
InnoDB: 127 rollback segment(s) active.
InnoDB: Creating foreign key constraint system tables
InnoDB: Foreign key constraint system tables created
120320 11:48:48  InnoDB: Waiting for the background threads to start
120320 11:48:49 InnoDB: 1.1.8 started; log sequence number 0
120320 11:48:52 [Note] Event Scheduler: Loaded 0 events
120320 11:48:52 [Note] mysql\bin\mysqld.exe: ready for connections.
Version: '5.5.16'  socket: ''  port: 3306  MySQL Community Server (GPL)

I am using xampp 1.7.7

please help...

Salman A
  • 262,204
  • 82
  • 430
  • 521
geometricRapper
  • 149
  • 1
  • 1
  • 6
  • can you able to access apache welcome page `http:\\localhost`? – Vishwanath Dalvi Mar 20 '12 at 06:54
  • Where is the line that says: `[Note] C:\...\mysqld: Normal shutdown`? What makes you say that MySQL shut itself down after 5 seconds? – Salman A Mar 20 '12 at 08:05
  • 1
    has this been solved? as no reply got accepted – Dominique Nov 01 '14 at 11:00
  • I've seen this behavior occurring ever so often in my students xampp Installation. What sometimes helps is deleting `ib_logfile0` and `ib_logfile1` . But not always. What helps is renaming `data` to `data01` and copy `backup` folder to `data` including its' contents. After that move (or copy) the custom database folders to the new `data` folder. – theking2 Oct 28 '21 at 12:18

9 Answers9

12

This worked for me,

  1. quit the XAMPP

  2. cut the All files in C:\xampp\mysql\backup

  3. paste and replace files in C:\xampp\mysql\data

  4. run as administrator the XAMPP

letmecheck
  • 1,183
  • 8
  • 17
4

i had the same problem and i have found a temporary solution by going to the installation folder

xampp->mysql->bin-> mysqld.exe file

running the mysqld.exe file

my xampp mysql service restarted successfully

Ranjit Kumar
  • 779
  • 2
  • 8
  • 20
3

I'm not sure if this will also work for your case, but it surely did for me, and I've yet to encounter the answer here.

go to Xampp/mysql/bin/my.ini

add the following line:

innodb_force_recovery = 1 

(I think anything > 0 works here, also... it might be handy to make a backup of the file just to be on the safe side.)

You should now be able to successfully start your mySQL service.

Rebirth
  • 1,011
  • 8
  • 14
  • Just for your information "As a safety measure, InnoDB prevents INSERT, UPDATE, or DELETE operations when innodb_force_recovery is greater than 0. An innodb_force_recovery setting of 4 or greater places InnoDB in read-only mode. " – theking2 Oct 28 '21 at 12:24
0

Did you by any chance update your old install and then copy/paste your old 'htdocs' and 'mysql data' files to the upgrade files?

Have just run into the same problem, which I solved by uninstalling then re installing. Copying only my Htdocs over then re building my database... A pain but as I am only in Development and using Symfony2 rebuilding my database with fixtures was pretty painless.

Hope this is of some help.

Doug.

Doug
  • 1,850
  • 23
  • 50
0

I had a similar problem that was caused by the TCP port needed for one for the services already being used by another application. In my case it was Skype using ports 80 and 443 as fall-back.

You can check if any of the needed TCP ports are used by another application by running the following at the command prompt:

c:>netstat /a

The offending connection will be listed as "LISTENING" in state STATE column. Then it's up to you to figure out what application is using the port. There is a nice tool called portmon for that.

The ports you'll need are 80, 3360... (anyone can expand on this?)

Dominique
  • 1,080
  • 14
  • 29
  • It is not very likely that mysql is configured to use port 80 or 443. What you mean start is Apache web server. The mysql daemon will use 3306 oob – theking2 Oct 28 '21 at 06:24
0

This is how I solved it:

  1. xampp control panel > config > service & port settings > apache > mainport > 80 (default) change to 81.

  2. open xampp > apache > cnonf > httpd.conf

3 search for ServerName localhost:80 change to ServerName localhost:81 search for Listen 80 change to Listen 81

  1. Start Xampp > apache

  2. open http://localhost:81/phpmyadmin/

whoaa its working

Shashank Saxena
  • 2,014
  • 17
  • 11
0

This worked for me, actually checking the 'mysql' service is not disabled. Turns out it was disabled.

how to check?

  1. windows + R (opens run window)
  2. type in services.msc
  3. check if the service mysql is set as disabled. (change it to automatic)

This helped me with my unknown Phpmyadmin not starting issue.

Jasper Lankhorst
  • 1,860
  • 1
  • 16
  • 22
0

If nothing helps, follow the steps mentioned in the below link. There are 3 methods to solve the problem. I hope, it will help you as well :)

For your convenience, I am writing down the steps of one of the methods which helped me to solved the problem

  1. First of all stop all the services running in xampp control panel
  2. Go to xampp > mysql >
  3. Rename the data folder to anything else, such as data-old.
  4. Then rename the backup folder to data

That's it. Try starting apache and mysql services from xampp control panel. Go to the link mentioned below to learn more.

https://kinsta.com/knowledgebase/xampp-mysql-shutdown-unexpectedly/

  • This worked for me, also don't forget to place back the ibdata1 file. Source: https://stackoverflow.com/questions/25039927/database-corruption-with-mariadb-table-doesnt-exist-in-engine – Lepy Apr 18 '22 at 09:21
0

This is an alternate solution instead of solving the above problem. I think you used windows installer for xampp, instead of that Download the zip file and keep it under c:\xampp. Use this link for downloading in zip format.

http://www.apachefriends.org/download.php?xampp-win32-1.7.7-VC9.zip

If you feel the zip file format is huge. Use 7zip file format.

http://www.apachefriends.org/download.php?xampp-win32-1.7.7-VC9.7z

Earlier I used to have same problem, solved it in this way.

vkrams
  • 7,267
  • 17
  • 79
  • 129