XAMPP - MySQL Unexpected Shutdown

When I open XAMPP and click the MySQL start button, this results in an error. I started it earlier, but now it does not work.

12:19:12 PM [mysql] Trying to start a MySQL application ...
12:19:12 PM [mysql] Status change detected: working
12:19:13 PM [mysql] Status change detected: stopped
12:19:13 PM [mysql] Error: MySQL shutdown unexpectedly.
12:19:13 PM [mysql] This may be due to a blocked port, lack of dependencies,
12:19:13 PM [mysql] wrong privileges, crashing or stopping in another way
12:19:13 PM [mysql] Click the Logs button to view the error logs and check 12:19:13 [mysql] Windows Event Viewer for more tips
12:19:13 PM [mysql] If you need more help, copy and publish this
12:19:13 PM [mysql] full forum log in forums

Here is the contents of the error log:

2013-08-02 12:19:12 4536 [Note] The 'FEDERATED' plugin is disabled.
2013-08-02 12:19:12 f64 InnoDB: Warning: using innodb_additional_mem_pool_size DEPRECATED. This option may be removed in future releases along with the innodb_use_sys_malloc option and the InnoDB internal memory allocator.
2013-08-02 12:19:12 4536 [Note] InnoDB: InnoDB memory heap is disabled
2013-08-02 12:19:12 4536 [Note] InnoDB: Mutexes and rw_locks use Windows lock functions

2013-08-02 12:19:12 4536 [Note] InnoDB: compressed tables use zlib 1.2.3
2013-08-02 12:19:12 4536 [Note] InnoDB: do not use crc32 CPU instructions
2013-08-02 12:19:12 4536 [Note] InnoDB: initialization of the buffer pool, size = 16.0M
2013-08-02 12:19:12 4536 [Note] InnoDB: buffer pool initialization completed
2013-08-02 12:19:12 4536 [Note] InnoDB: The maximum supported file format is Barracuda. A.
2013-08-02 12:19:12 4536 [Note] InnoDB: log numbers 0 and 0 in ibdata files do not match log number 1616798 in ib_logfiles!
2013-08-02 12:19:12 4536 [Note] InnoDB: the database has not been disconnected normally!
2013-08-02 12:19:12 4536 [Note] InnoDB: starting recovery after a failure.
2013-08-02 12:19:12 4536 [Note] InnoDB: reading table space information from .ibd files ...

The most important error message:

2013-08-02 12:19:12 4536 [ERROR] InnoDB:
Trying to open a previously opened tablespace.
The previous mysql / innodb_table_stats tablespace uses the space ID: 1 in the file path:. \ Mysql \ innodb_table_stats.ibd.
Cannot open the xat / payments tablespace that uses the space ID: 1 in the file path:. \ Xat \ payments.ibd

The rest of the magazine:

InnoDB: Error: Could not open tablespace file in single table. \ xat \ payments.ibd
InnoDB: We do not continue to recover from a failure because the table may become InnoDB: corrupted if we cannot apply the journal entries in the InnoDB log to it.
InnoDB: fix the problem and start mysqld:
InnoDB: 1) If there is a permission problem in the file and mysqld cannot InnoDB: open the file, you must change the permissions.
InnoDB: 2) If the table is not needed or you can restore it from the backup,
InnoDB: then you can delete the .ibd file and InnoDB will do normal
InnoDB: crash recovery and ignoring this table.
InnoDB: 3) If the file system or drive is damaged and you cannot delete the InnoDB: .ibd file, you can set innodb_force_recovery> 0 to my.cnf
InnoDB: and get InnoDB to continue disaster recovery here.

What is the reason for these errors and how to fix them?

+58
mysql xampp
Aug 02 '13 at 17:27
source share
25 answers

Hey, I just did it and it worked:

  • log out of Xampp server
  • go to the directory C:\xampp\mysql\data
  • delete the ibdata1 file
  • restart xampp server

He should work

+162
Aug 10 '13 at 13:14
source share
  • Go to mysql / data /
  • Delete all random files (except the actual database folders)
  • Restart Apache and MySQL .

He must fix it.

+27
Jan 21 '16 at 12:55
source share

My Xampp MySQL worked as follows:

 01.Go to mysql/data/ directory 02. delete the ibdata1 & ib_logfile*(ib_logfile0,ib_logfile1,ib_logfile101) file 03. restart xampp server 
+15
Dec 04 '16 at 9:45
source share

Add the following line below the [mysqld] section in the mysql configuration file (my.ini) and restart the apache web server and mysql service.

 [mysqld] innodb_force_recovery = 4 
+14
Dec 16 '13 at 17:40
source share

I have the same error in my C:\xampp\mysql\data\mysql_error.log when trying to start mysql.

 2013-08-05 01:20:32 6780 [ERROR] InnoDB: Attempted to open a previously opened tablespace. Previous tablespace mysql/slave_relay_log_info uses space ID: 3 at filepath: .\mysql\slave_relay_log_info.ibd. Cannot open tablespace test_database/test_table which uses space ID: 3 at filepath: .\test_database\test_table.ibd 

You will have to carefully read the error. This suggests that test_database prevents mysql from starting.

You can bring down a corrupting database, these steps fix the problem:

  • Make sure mysql and xampp are completely closed.
  • Go to the directory where mysql is installed, mine: C:\xampp\mysql\data
  • You should see a folder with the name of the database you created. mine was test_database .
  • Create a new folder elsewhere called C:\xampp\mysql\data\mysql\backuptablespace
  • Drag (do not delete) the corrupted database table folder into the backup directory.
  • Try running mysql again. For me, it started right after 1 second, as expected.

If this does not work, return the file to where you started, and you will return to where you started.

If you do not want to delete the database and do not have backups:

If you do not have backup copies of the table data, and mysql does not start because something is damaged, you will have to use the repair process to guess and check your path to what you did that messed it up. Follow these steps:

  • Make a clone of all C:\xampp\ and keep it somewhere safe so that you can return to where you started.
  • Use the binary search method to try to find the damaged item in the mysql database. It can be a file, or a table, or a database, or a user, or something else.
  • Delete the entire database and see if it allows you to start mysql. If so, return the database and try deleting some of the tables. If this is not the case, try pulling something else out before it starts.
  • Try deleting these files from C:\xampp\mysql\data\mysql : db.frm db.MRD db.MYI db.opt user.frm user.MYD user.MYI

  • When you start mysql, try returning everything until you find one thing you add that will prevent it from starting. One bonus for this is that you will learn how mysql works under the hood.

Nuclear option:

Something you messed up with the mysql server. Removing and reinstalling XAMPP should undo the damage.

+11
Aug 08 '13 at 17:25
source share

When you do not start XAMPP as an administrator, shutting down MySQL often causes corruption, which means you need to repair or delete your tables. To avoid this, you need to either run XAMPP as an administrator, or use the appropriate command line method to disable MySQL.

You can delete ibdata1 , as Kratos suggests, but this may leave you with a broken database, since other parts of your database are still in the /mysql/data/ folder. In my case, this residual data stopped me from successfully installing WordPress.

A cleaner way to eliminate the damage is to return the entire /mysql/data/ folder. Windows has built-in folder versioning - right-click on /mysql/data/ and select Restore previous versions . Then you can delete the current contents of the folder and replace it with the contents of the older version.

Addition. So that you don't forget to start XAMPP as an administrator, you can right-click on the XAMPP shortcut, go to Properties , then Advanced and finally check Run as administrator .

+9
Nov 07 '13 at 15:37
source share

I also ran into this problem, and that is how I solved it.
1. Make sure xampp is not under a subdirectory. For example, it should be C: \ xampp
2. Perhaps, to run the application can be launched as an administrator.

Hope it works!

+7
Aug 13 '13 at 18:31
source share

Here is what I did. I restarted the computer. Then I launched services.msc. I stopped the MySQL service and then restarted it. Restarted the Xampp server.

+2
Jan 11 '17 at 15:18
source share

I ran into one problem and none of the above solutions helped me. I went to the mysql configuration file (my.ini) and changed the port number in [mysqld]. By default, mysql runs on port 3306.

 port= 3306 

I changed it

 port= 8111 

Then run as Administrator. Finally it worked for me.

+2
Mar 26 '18 at 7:24
source share

Guys just make sure you don't have a MySql server. Since I have MySql server installed, and when I start mysql from the xampp control panel, some port conflicts occur and they do not work. SO Before starting mysql from xampp control panel, make sure mysql server is not installed. I use.net, so I installed mysql server in the past. Uninstalling this problem solved my problem ....

+2
May 14 '18 at 7:24
source share

Config-> Apache-> Open httpd.conf. do a Listen or 80 search, update the listening port to the save and reboot server 8081. Oh and shutdown Skype, if you have one.

+1
Aug 02 '13 at
source share

In my case, when I synchronized my mysql and htdocs data with Dropbox, I just needed to delete the conflicting files in the mysql / data folder and subfolders. Conflicting files can be identified by its names, dropbox will notify you of this. He solved the problem for me.

+1
Jan 11 '15 at 9:15
source share

For me, I left Skype, which occupied port 80, and then Apache worked successfully on port 80, and then I started Skype, and this time it chose a different port.

+1
Jun 28 '15 at 15:57
source share

Make sure the system time is correct. The mine was installed in 2040 somehow, correcting the date the problem was solved.

+1
Dec 26 '16 at 6:11
source share

if you use MariaDB you can try the following:

  1. Go to mysql / data /
  2. Rename aria_log_control to aria_log_control_old
  3. Restart Mykl
+1
Mar 28 '18 at 15:00
source share

I will comment on this statement in mysql / bin / my.ini

 'innodb_additional_mem_pool_size=2M' 

and he solves my problem. than you each

+1
Jun 20 '18 at 9:05
source share

To do this, you need to click on the x option in the "Module Services" section and install the MYSQL services. Then start the service. Here you go.

0
Feb 03 '15 at
source share

No solution above worked for me. then I did the following:

I deleted all the files inside the C: \ xampp \ mysql \ data \ directory, except for the folders in this directory. It worked fine, but my previous databases are not working right now. So do the above, if you do not care, it will delete all your previous databases in phpmyadmin.

0
Jan 17 '17 at 13:33
source share

If the error message "mysql.exe has stopped working." Just run xampp-control.exe as soon as the administrator solves your problem instantly.

0
Jul 05 '17 at 7:36
source share

If any of the above does not work, back up the Xampp directory and reinstall Xampp. It really works!

0
Aug 10 '17 at 16:47 on
source share

This means that you already have a MySQL database running on port 3306.

On the XAMPP control panel, click the "Config" button and then click "my.ini". After that, press Ctrl-F and find "3306". Replace any β€œ3306” that you find with a different port number of your choice (you can choose 3307 or 3308 - I chose 2811, and it worked).

After you have replaced every place that says "3306", save the file and click "Start" on the control panel again.

0
Oct. 31 '18 at 12:46
source share

Rename the below files from mysql / data ib_logfile0 ib_logfile1 ibdata1

my.cnf innodb_buffer_pool_size up to 200M according to your RAM innodb_log_buffer_size up to 32M

Reboot Apache Server

hope this helps you

0
Dec 12 '18 at 4:55
source share

I decided! deactivate UAC with msconfig before installing xampp

enter image description here

0
Jul 13 '19 at 17:55
source share

Moreover, the exact answer also worked for me !!!! ! A cleaner way to repair the damage is to return the entire / mysql / data / folder. Windows has built-in support for folder versions - right-click on / mysql / data / and select "Restore Previous Versions". Then you can delete the current contents of the folder and replace it with the contents of the older version. as mentioned above by Ryan Williams.

0
Jul 25 '19 at 2:59
source share

Go to task manager And search mysqld and right click and select END TASK and update XAMPP

0
Sep 07 '19 at 6:05
source share



All Articles