MySql stops unexpectedly
Asked Answered
S

9

31

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!
Statics answered 3/7, 2019 at 8:7 Comment(0)
D
79

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

Denys answered 20/8, 2020 at 10:55 Comment(5)
Kindly note this is a temporary solution, on my side, this is like 5th time I'm experiencing the error and I have decided to reinstall it. My current xampp is 7.429Insentient
Thanks for your reponse @ovicko. Yes, It is a temporary solution. It is depends on the pointof time the backup done. few cases it will be fixed at first time. Some of the cases this error may repeating. We can use this to get the Database back and then go for the suitable Xampp versionDenys
Afterwards follow this #33840069 to avoid cache errorsTragopan
Does anybody found any proper solution for this? even after installing a whole new version (latest) of xampp i am getting the similar kind of error, that too all of suddenHurtless
I got the MYSQL shutdown error in XAMPP, and it took me a day to find this answer, which I already voted it years ago. Best answer by far. Should be marked as correct answer. Thank youUndersell
C
22

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

Climb answered 12/11, 2019 at 10:9 Comment(1)
In my case I was getting an error mysqld.exe: Table '.\mysql\db' is marked as crashed and last (automatic?) repair failed so I copied only mysql folder from backup and pasted inside the data folder to resolve my issueIrradiant
B
2

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

Beaumont answered 3/7, 2019 at 8:28 Comment(0)
H
2

If your backup folder doesn't include your latest DB changes and you are stuck with collation of in use, then do this instead:

  1. Install another XAMPP instance in new folder;
  2. Copy the single folder of: [old_xampp]/mysql/data/[table_name]/ into [new_xampp]/mysql/data/;
  3. Copy a file from: [old_xampp]/mysql/data/ibdata1 to: [new_xampp]/mysql/data/ibdata1 and replace it;
  4. Stop old XAMPP;
  5. Run new XAMPP.
  6. DONE!

All your new table entries should be brought back.

Haber answered 2/2, 2021 at 9:40 Comment(0)
F
0

Step 1: rename mysql\data to mysql\data.backup Step 2: duplicate mysql\backup folder to mysql\data ( still keep mysql\backup) Step 3: Start mysql -> It is working Step 4: Stop mysql copy database in mysql\data.backup to mysql\data Step 5: Start Mysql. It is done

Fibroin answered 3/7, 2019 at 8:7 Comment(0)
A
0

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

Anticholinergic answered 28/9, 2020 at 18:13 Comment(0)
C
0

Here is what I did to solve this issue because I had databases that I couldn't just lose it.

Step 1: I installed a fresh Xampp. make sure you stop apache/mysql after it started then follow the next steps.

Step 2: Made a backup from the "mysql\data" folder: Copy/past "data-org".

step 3: From my old Xampp mysql/data directory, I copied the database folders only. Note: each database will have a folder and I paste the folders inside my new Xampp mysql/data folder.

step 4: Copied the "ibdata1" file from my old Xampp mysql/data directory and paste it in the new Xampp mysql/data directory.

Step 5: started the new Apache/MySql and made a backup from my databases using phpMyAdmin and stopped Apache/MySql.

Step 6: Deleted all the files and folder from my new Xampp mysql/data folder and copied all the files/folders from the data-ORG folder(refer to step 2) and paste them in the new Xampp mysql/data folder.

Step 7: Started the new Xampp Apache/MySql and created my databases using phpMyAdmin and imported the sql backups files for each database.

Step 8: Tested my applications and they all were working fine.

Corpulence answered 16/5, 2023 at 9:55 Comment(0)
A
0

Ok seems like if Mysql has a large database that consumes too much processing power then Windows Defender stops the MySql process.

https://answers.microsoft.com/en-us/windows/forum/all/windows-defender-in-windows-10-scans-and-blocks/e79012c0-216a-484d-9058-ba741d91bcd5

All you need to do is add mysqld and mysqld.exe to the process exclusion list.

Also, allow MySql on both your private and public firewall under Windows Defender.

Arborization answered 29/11, 2023 at 22:11 Comment(0)
S
0

For me the Google Drive was corrupting my mysql/data files while running or syncing. I couldn't find a solution but not running Google Drive while using XAMPP seems to help.

Silvern answered 4/4 at 23:45 Comment(2)
Yeah downvote because it didn't work for you? It might work for someone else...Mosely
That helpfed meProceleusmatic

© 2022 - 2024 — McMap. All rights reserved.