Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

mysql in xampp starts and stops in five seconds

Tags:

mysql

xampp

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...

like image 398
geometricRapper Avatar asked Mar 20 '12 06:03

geometricRapper


People also ask

Why MySQL is stopping in XAMPP?

Cause of “Error: MySQL Shutdown Unexpectedly” in XAMPP Apart from corrupted files, improper database shut down, missing files and port changes can also cause this error. When you run MySQL in a webserver, the corrupted files in the mysql/data folder cause MySQL to shut down.

How do I fix MySQL unexpectedly shutdown XAMPP?

The good news is that, if this does happen, there are three methods you can use to troubleshoot the issue: Run XAMPP using administrator privileges. Restore your database backup. Change your MySQL port.

How do I stop MySQL from shutting down unexpectedly?

Rename folder mysql/data to mysql/data_old. Make a copy of mysql/backup folder and name it as mysql/data. Copy all your database folders from mysql/data_old into mysql/data (except mysql , performance_schema , and phpmyadmin folders) Copy mysql/data_old/ibdata1 file into mysql/data folder.


2 Answers

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

like image 106
letmecheck Avatar answered Sep 21 '22 17:09

letmecheck


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.

like image 28
Rebirth Avatar answered Sep 21 '22 17:09

Rebirth