Skip to content
Fix Code Error

XAMPP – MySQL shutdown unexpectedly

March 13, 2021 by Code Error
Posted By: Anonymous

When I open XAMPP and click start MySQL button and it gives me an error.
I had started it just before, but now it isn’t working.

12:19:12 PM [mysql] Attempting to start MySQL app…
12:19:12 PM [mysql] Status change detected: running
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, missing dependencies,
12:19:13 PM [mysql] improper privileges, a crash, or a shutdown by another method
12:19:13 PM [mysql] Press the Logs button to view error logs and check
12:19:13 PM [mysql] the Windows Event Viewer for more clues
12:19:13 PM [mysql] If you need more help, copy and post this
12:19:13 PM [mysql] entire log window on the forums

Here is the contents of the error log:

2013-08-02 12:19:12 4536 [Note] Plugin ‘FEDERATED’ is disabled.
2013-08-02 12:19:12 f64 InnoDB: Warning: Using innodb_additional_mem_pool_size is DEPRECATED. This option may be removed in future releases, together with the option innodb_use_sys_malloc and with the InnoDB’s internal memory allocator.
2013-08-02 12:19:12 4536 [Note] InnoDB: The InnoDB memory heap is disabled
2013-08-02 12:19:12 4536 [Note] InnoDB: Mutexes and rw_locks use Windows interlocked 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: Not using CPU crc32 instructions
2013-08-02 12:19:12 4536 [Note] InnoDB: Initializing buffer pool, size = 16.0M
2013-08-02 12:19:12 4536 [Note] InnoDB: Completed initialization of buffer pool
2013-08-02 12:19:12 4536 [Note] InnoDB: Highest supported file format is Barracuda.
2013-08-02 12:19:12 4536 [Note] InnoDB: The log sequence numbers 0 and 0 in ibdata files do not match the log sequence number 1616798 in the ib_logfiles!
2013-08-02 12:19:12 4536 [Note] InnoDB: Database was not shutdown normally!
2013-08-02 12:19:12 4536 [Note] InnoDB: Starting crash recovery.
2013-08-02 12:19:12 4536 [Note] InnoDB: Reading tablespace information from the .ibd files…

The most important error message is here:

2013-08-02 12:19:12 4536 [ERROR] InnoDB:
Attempted to open a previously opened tablespace.
Previous tablespace mysql/innodb_table_stats uses space ID: 1 at filepath: .mysqlinnodb_table_stats.ibd.
Cannot open tablespace xat/payments which uses space ID: 1 at filepath: .xatpayments.ibd

The rest of the log:

InnoDB: Error: could not open single-table tablespace file .xatpayments.ibd
InnoDB: We do not continue the crash recovery, because the table may become
InnoDB: corrupt if we cannot apply the log records in the InnoDB log to it.
InnoDB: To 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 should modify the permissions.
InnoDB: 2) If the table is not needed, or you can restore it from a backup,
InnoDB: then you can remove the .ibd file, and InnoDB will do a normal
InnoDB: crash recovery and ignore that table.
InnoDB: 3) If the file system or the disk is broken, and you cannot remove
InnoDB: the .ibd file, you can set innodb_force_recovery > 0 in my.cnf
InnoDB: and force InnoDB to continue crash recovery here.

What is the cause of these errors and how can I rectify them?

Solution

STOP! Please do NOT delete ibdata1 file!

Deleting this file is like playing a Russian roulette with your databases, it could work and restablish everything, but also, probably could leave unusable every database you have.

Instead, first try using the MySQL backup folder which is included with XAMPP. So do the next:

  1. Rename the folder mysql/data to mysql/data_old (you can use any name)
  2. Create a new folder mysql/data
  3. Copy the content that resides in mysql/backup to the new mysql/data folder
  4. Copy all your database folders that are in mysql/data_old to mysql/data (skipping the mysql, performance_schema, and phpmyadmin folders from data_old)
  5. Finally copy the ibdata1 file from mysql/data_old and replace it inside mysql/data folder
  6. Start MySQL from XAMPP control panel

And, voilà!

Answered By: Anonymous

Related Articles

  • Maven2: Missing artifact but jars are in place
  • How do SO_REUSEADDR and SO_REUSEPORT differ?
  • What are the new features in C++17?
  • Apache is not running from XAMPP Control Panel (…
  • CastError: Cast to ObjectId failed for value In…
  • Completely uninstall PostgreSQL 9.0.4 from Mac OSX Lion?
  • Apache won't run in xampp
  • GLYPHICONS - bootstrap icon font hex value
  • how to create virtual host on XAMPP
  • How to change XAMPP apache server port?
  • Eclipse will not start and I haven't changed anything
  • Apache 2.4.3 (with XAMPP 1.8.1) not starting in windows 8
  • XAMPP - Error: MySQL shutdown unexpectedly
  • Apache shutdown unexpectedly
  • What does "Fatal error: Unexpectedly found nil while…
  • XAMPP: Couldn't start Apache (Windows 10)
  • Rust: implementing an iterator from a vector of…
  • XAMPP, Apache - Error: Apache shutdown unexpectedly
  • How do I shutdown, restart, or log off Windows via a…
  • Confused about UPDLOCK, HOLDLOCK
  • Access denied for user 'root'@'localhost' while…
  • Grant all on a specific schema in the db to a group…
  • Node.js/Express.js App Only Works on Port 3000
  • Heroku "Missing required flag -a --app" error after…
  • Unable to create/open lock file: /data/mongod.lock…
  • Remove privileges from MySQL database
  • sql query to find priority jobs
  • XAMPP MySQL password setting (Can not enter in PHPMYADMIN)
  • Logging best practices
  • Polymer routing: inner routes not reflecting
  • Integrating JSON feed with Backbone JS
  • How can I get the Windows last reboot reason
  • Use SQL Server Management Studio to connect remotely…
  • webpack-dev-server npm run dev throwing TypeError:…
  • Unable to run Robolectric and Espresso with a…
  • Correctly configure webpack-dev-middleware with…
  • List all the files and folders in a Directory with…
  • Couldn't connect to server 127.0.0.1:27017
  • WAMP server, localhost is not working
  • Cannot read property '$i18n' of undefined when using…
  • How to handle a redis connection error in express?
  • Is this very likely to create a memory leak in Tomcat?
  • "gatsby-source-airtable" threw an error while…
  • Apache could not be started - ServerRoot must be a…
  • XAMPP on Windows - Apache not starting
  • Onclick, the button moves down, why can that due to?
  • Mismatch Detected for 'RuntimeLibrary'
  • Why is a "GRANT USAGE" created the first time I…
  • Google in-app billing, a toast breaks everything
  • Smart way to truncate long strings
  • How can I manually compile a svelte component down…
  • Playing HTML5 video on fullscreen in android webview
  • Am I paranoid? "Brutally" big Polymer website after…
  • Using Auto Layout in UITableView for dynamic cell…
  • WampServer orange icon
  • Vue npm run serve starts on random port
  • Backend not loading into browser because of…
  • How do I use MySQL through XAMPP?
  • Laravel App not running on xampp or live server but…
  • How can I find the product GUID of an installed MSI setup?
  • Best TCP port number range for internal applications
  • How do I append a node to an existing XML file in java
  • 16 to 1 mux using 2 to 1 mux in vhdl
  • Apache Server (xampp) doesn't run on Windows 10 (Port 80)
  • XAMPP keeps showing Dashboard/Welcome Page instead…
  • Google Maps Android API v2 - Interactive InfoWindow…
  • Error when trying to access XAMPP from a network
  • Start redis-server with config file
  • Validation failed for one or more entities. See…
  • How do I deal with installing peer dependencies in…
  • Backbone.js - Should nested Views maintain…
  • MySQL: When is Flush Privileges in MySQL really needed?
  • Building executable jar with maven?
  • How to connect to a docker container from outside…
  • Give all permissions to a user on a PostgreSQL database
  • What's the difference between dependencies,…
  • Overriding .fetch() works with fake data, errors…
  • xampp MySQL does not start
  • Cannot receive data from ORSSerialPort
  • Postgres - how can I restrict the privilege to…
  • SSH -L connection successful, but localhost port…
  • How to find the default JMX port number?
  • Code conversion issue from Java to Kotlin
  • Is there a way to have a switch statement for an…
  • "Thinking in AngularJS" if I have a jQuery background?
  • Worker Script Failing to Load for Vue Webpack Built App
  • Oracle listener not running and won't start
  • Backbone.js filter on any value in a collection
  • Launching Spring application Address already in use
  • httpd-xampp.conf: How to allow access to an external…
  • Group array of objects by multiple keys using d3.groups
  • Can a website detect when you are using Selenium…
  • Android adding simple animations while…
  • jQuery Mobile: document ready vs. page events
  • Node.js EACCES error when listening on most ports
  • Mongod complains that there is no /data/db folder
  • Backbone Collection.fetch gives me Uncaught…
  • error LNK2038: mismatch detected for '_MSC_VER':…
  • getting error while updating Composer
  • How to kill a running SELECT statement

Disclaimer: This content is shared under creative common license cc-by-sa 3.0. It is generated from StackExchange Website Network.

Post navigation

Previous Post:

How do I break a string in YAML over multiple lines?

Next Post:

Convert tabs to spaces in Notepad++

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

.net ajax android angular arrays aurelia backbone.js bash c++ css dataframe ember-data ember.js excel git html ios java javascript jquery json laravel linux list mysql next.js node.js pandas php polymer polymer-1.0 python python-3.x r reactjs regex sql sql-server string svelte typescript vue-component vue.js vuejs2 vuetify.js

  • you shouldn’t need to use z-index
  • No column in target database, but getting “The schema update is terminating because data loss might occur”
  • Angular – expected call-signature: ‘changePassword’ to have a typedeftslint(typedef)
  • trying to implement NativeAdFactory imports deprecated method by default in flutter java project
  • What should I use to get an attribute out of my foreign table in Laravel?
© 2022 Fix Code Error