Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

MySql stops unexpectedly

Tags:

mysql

xampp

MySql stops unexpectedly

Here is a copy of Error log:

2019-07-03 13:27:50 0 [ERROR] InnoDB: Your database may be corrupt or you may have copied the InnoDB tablespace but not the InnoDB log files. Please refer to https://mariadb.com/kb/en/library/innodb-recovery-modes/ for information about forcing recovery.

2019-07-03 13:27:50 0 [Note] InnoDB: 128 out of 128 rollback segments are active.

2019-07-03 13:27:50 0 [ERROR] InnoDB: Page [page id: space=0, page number=305] log sequence number 2834539 is in the future! Current system log sequence number 1604011.

2019-07-03 13:27:50 0 [ERROR] InnoDB: Your database may be corrupt or you may have copied the InnoDB tablespace but not the InnoDB log files. Please refer to https://mariadb.com/kb/en/library/innodb-recovery-modes/ for information about forcing recovery.

2019-07-03 13:27:50 0 [Note] InnoDB: Creating shared tablespace for temporary tables

2019-07-03 13:27:50 0 [Note] InnoDB: Setting file 'C:\xampp\mysql\data\ibtmp1' size to 12 MB. Physically writing the file full; Please wait ... 2019-07-03 13:27:50 0 [Note] InnoDB: File 'C:\xampp\mysql\data\ibtmp1' size is now 12 MB.

2019-07-03 13:27:50 0 [Note] InnoDB: Waiting for purge to start

2019-07-03 13:27:50 0 [Note] InnoDB: 10.3.16 started; log sequence number 1604002; transaction id 1432

2019-07-03 13:27:50 0 [Note] InnoDB: Loading buffer pool(s) from C:\xampp\mysql\data\ib_buffer_pool

2019-07-03 13:27:50 0 [ERROR] InnoDB: Page [page id: space=0, page number=9] log sequence number 2841120 is in the future! Current system log sequence number 1604011. 2019-07-03 13:27:50 0 [ERROR] InnoDB: Your database may be corrupt or you may have copied the InnoDB tablespace but not the InnoDB log files. Please refer to https://mariadb.com/kb/en/library/innodb-recovery-modes/ for information about forcing recovery.

2019-07-03 13:27:50 0 [ERROR] InnoDB: Page [page id: space=0, page number=243] log sequence number 2082633 is in the future! Current system log sequence number 1604011. 2019-07-03 13:27:50 0 [ERROR] InnoDB: Your database may be corrupt or you may have copied the InnoDB tablespace but not the InnoDB log files. Please refer to https://mariadb.com/kb/en/library/innodb-recovery-modes/ for information about forcing recovery.

2019-07-03 13:27:50 0 [ERROR] InnoDB: Page [page id: space=1, page number=0] log sequence number 1608629 is in the future! Current system log sequence number 1604011. 2019-07-03 13:27:50 0 [Note] Plugin 'FEEDBACK' is disabled.

2019-07-03 13:27:50 0 [ERROR] InnoDB: Your database may be corrupt or you may have copied the InnoDB tablespace but not the InnoDB log files. Please refer to https://mariadb.com/kb/en/library/innodb-recovery-modes/ for information about forcing recovery.

2019-07-03 13:27:50 0 [ERROR] InnoDB: Page [page id: space=1, page number=1] log sequence number 1604111 is in the future! Current system log sequence number 1604011. 2019-07-03 13:27:50 0 [ERROR] InnoDB: Your database may be corrupt or you may have copied the InnoDB tablespace but not the InnoDB log files. Please refer to https://mariadb.com/kb/en/library/innodb-recovery-modes/ for information about forcing recovery.

2019-07-03 13:27:50 0 [Note] Server socket created on IP: '::'.

2019-07-03 13:27:50 0 [ERROR] InnoDB: Page [page

  • What can I do to get my database up and running again? All help is greatly appreciated!
like image 539
Sk Md Nurujjaman Avatar asked Jul 03 '19 08:07

Sk Md Nurujjaman


People also ask

Why does MySQL shut down unexpectedly?

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 blocked ports in MySQL?

Change Client and Server Ports This can happen when the ports that MySQL server is trying to use are already being used by another service or when the said ports are blocked on your system. To resolve the problem, you will have to change the client and server ports from the my. ini file.


4 Answers

I have faced the same problem. I just followed the below steps

Step 1: Moved(cut/paste) all the files in C:\xampp\mysql\data to desired backup location.

Step 2: After that copied all the files from C:\xampp\mysql\backup to C:\xampp\mysql\data

Step 3: Restarted mysql and checked the phpmyadmin url, it worked.

Step 4: After that stopped mysql that copied ibdata1 file from backup location to C:\xampp\mysql\data

Step 5: Restarted mysql

Step 6: After that copied all database folders and checked all the tables, It worked.

like image 120
Senthilnadhan Ramasamy Avatar answered Nov 15 '22 15:11

Senthilnadhan Ramasamy


Just Unintall XAMPP and the reinstall it , it will resolve all the issue , but make sure to have the backup of your MYSQL database.

like image 40
Sarwar Ali Avatar answered Nov 15 '22 14:11

Sarwar Ali


I also faced this issue and searched a lot only one solution worked for me.

Just copy all files from C:\xampp\mysql\backup to C:\xampp\mysql\data

Make sure to take backup of your data folder to avoid any further problems.

If you see any error related to table engine then you can copy file ibdata1 from your backup data folder to current data folder

like image 32
Afraz Ahmad Avatar answered Nov 15 '22 13:11

Afraz Ahmad


Seems that there is corruption in MySQL log and/or data files, one way to workaround this problem is to start MySQL in recovery mode. From my.ini in windows (or my.cnf in Linux) add the following line: innodb_force_recovery=1 under [mysqld] section then re-start MySQL service.

If the problem persisted, mysqlcheck can help, move to the folder where MySQL binaries exist in your machine, and in Command Line execute ./mysqlcheck.exe --all-databases this will list tables that are corrupted

Reference: https://dev.mysql.com/doc/refman/8.0/en/forcing-innodb-recovery.html

like image 45
Zeid Al-Rashwani Avatar answered Nov 15 '22 14:11

Zeid Al-Rashwani