Error started after Mysql data migration _ MySQL

Source: Internet
Author: User
I don't know why I couldn't start mysql after work today. after a long time, I decided to reinstall my local server with wamp. during The reinstallation, I had to back up data, the simplest and most crude backup method I used was to directly go to the mysql installation directory, and I had no idea why I couldn't start mysql after I went to work today. after a long time, I decided to reinstall mysql.

My local server uses wamp. during The reinstallation, data backup is required. the simplest and most crude backup method I use is to directly go to the mysql installation directory, copy data.


Then uninstall wamp and reinstall it. data migration is to paste data to the same location and replace it with OK.

However, after the migration is completed today, mysql cannot be started. check the log and display various errors.

13:40:29 5196 [Note] Plugin "FEDERATED 'is disabled.
13:40:29 5196 [Note] InnoDB: The InnoDB memory heap is disabled
13:40:29 5196 [Note] InnoDB: Mutexes and rw_locks use Windows interlocked functions
13:40:29 5196 [Note] InnoDB: Compressed tables use zlib 1.2.3
13:40:29 5196 [Note] InnoDB: Not using CPU crc32 instructions
13:40:29 16e4 InnoDB: Error: unable to create temporary file; errno: 2
13:40:29 5196 [ERROR] Plugin 'innodb' init function returned error.
13:40:29 5196 [ERROR] Plugin 'innodb' registry as a storage engine failed.
13:40:29 5196 [ERROR] Unknown/unsupported storage engine: InnoDB
13:40:29 5196 [ERROR] Aborting

After viewing various materials, I deleted the database folder under the data Directory andIbdata1And then restart the file. OK, the green icon is displayed, and mysql starts normally.

* Note: Do not delete ibdata1. check the information. this is an important file that stores innodb-related data.

Of course, as a sister-in-law blogger, I naturally have my own care. Why can I start it after I delete other files?



In addition, various tests were conducted during the migration process.

1. only replace the database folder in data. after the restart, mysql can start. However, after connecting to the database with navicat, the data table cannot be opened, indicating that the data table does not exist (that is, data is lost, which is related to ibdata1)

2. replace the database folder and ibdata1 in the data file backed up in advance with the data directory and restart mysql.

3. delete ib_logfile0 and ib_logfile1, restart, mysql starts normally, and information about the connected database data table is restored.

I have roughly understood the usage of these three files. the specific reason is to be further investigated.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.