MySQL converting from MyISAM to InnoDB errors and common solutions

Source: Internet
Author: User

It was originally used for installation. Therefore, when setting database usage (for example, 1), follow the official discuz suggestions, all selected are Non-Transactional Database Only (Only Non-transaction databases of MyISAM data engine are supported). InnoDB is not required for MyISAM databases, so INNODB engine is not directly loaded. Later, I was working on WordPress. I didn't know that WordPress was using the InnoDB Data Engine at the beginning, so I built a database in the original database. I didn't find any problems at the beginning, it's okay to import the SQL statement. I didn't think much about it at the time. The problem is that one more WordPress is installed and phpmyadmin is used to access the database a little more. The error message "invalid mysqld-nt.exe application error" occurs when the "0x0050000c4" command references the "0x00786000" memory. The memory cannot be read... ", and then the MySQL Service stopped, login failed, and the whole database could not be accessed.

Figure 1 set the Database Type

After a long struggle, I forgot what articles I saw triggered the inspiration. Later I realized that it was a disaster caused by different data engines. So I thought of re-running the settings wizard and changing the database type to support the InnoDB engine. Set the database type in the Wizard (that is, the database usage in Figure 1) to the second item, in the subsequent InnoDB Tablespace Settings, place the InnoDB data file Settings in the D: \ MySQL InnoDB Datafiles directory. But at the end of execute, there is always a problem with Start Service, such as 2.

Figure 2 Start service error

You cannot start the service directly in services. msc. The error message is:" Mysql service cannot be started on the local computer. Error 1067: the process is aborted unexpectedly."According to some practices on the Internet, if the MySQL service is uninstalled and it is re-set without restarting, the problem is as follows. If the service is uninstalled and re-set after restart, the service is successfully started, but there are new problems in the following Applying Security Settings, such as 3. Figure 2 the ERROR message is "ERROR 2003: Can't connect to MySQL server on 'localhost' (10061)", indicating that MySQL is not started or started, the error is disabled again.
By the way, in MySQL5 (I don't know about other versions), every time you run the setup wizard, you only need to execute the execute Command, will automatically generate an original MySQL setting file in the installation directory of mysql5. ini. And it will be named after the modification time. Therefore, if an error occurs, you can recover from the backup file. Later, I found the idea in the error log. The error log is the. err file named after your computer in the MySQL5 installation directory \ Data directory. First, I found the following section: InnoDB: Error: log file. \ ib_logfile0 is of different size 0 52428800 bytesInnoDB: than specified in the. cnf file 0 10485760 bytes! 101001 9:47:42 [ERROR] Default storage engine (InnoDB) is not available101001 9:47:42 [ERROR] Aborting101001 9:47:42 [Note] D: \ MySQL5 \ bin \ mysqld-nt: shutdown complete: In the "MySQL5 installation directory \ Data" directory, delete the ib_logfile0 log file and restart the MySQL service. The error 10067 is returned. Check the err file again. 101001 18:39:29 InnoDB: Log file. \ ib_logfile0 did not exist: new to be createdInnoDB: Setting log file. \ ib_logfile0 size to 109 MBInnoDB: Database physically writes the file full: wait... innoDB: Progress in MB: 100 InnoDB: Error: log file. \ ib_logfile1 is of different size 0 52428800 bytesInnoDB: than specified in. cnf file 0 114294784 bytes! 101001 18:39:30 [ERROR] Default storage engine (InnoDB) is not available101001 18:39:30 [ERROR] Aborting101001 18:39:30 [Note] D: \ MySQL5 \ bin \ mysqld-nt: Shutdown complete can be seen, the ib_logfile0 problem is solved, but the same problem lies in ib_logfile1. Therefore, I drew a gourd, deleted ib_logfile1, and restarted the MySQL service, but it was useless. Is it necessary to restart the system. If you delete the first two ib_logfiles, restart the system. The reason may be that you just started the instance. Actually, the system needs to be restarted.. The Log is as follows: 101001 19:19:24 InnoDB: Log file. \ ib_logfile0 did not exist: new to be createdInnoDB: Setting log file. \ ib_logfile0 size to 109 MBInnoDB: Database physically writes the file full: wait... innoDB: Progress in MB: 100101001 19:19:26 InnoDB: Log file. \ ib_logfile1 did not exist: new to be createdInnoDB: Setting log file. \ ib_logfile1 size to 109 MBInnoDB: Database physically writes the file fu Ll: wait... innoDB: Progress in MB: 100 InnoDB: Cannot initialize created log files becauseInnoDB: data files are stored upt, or new data files wereInnoDB: created when the database was started previusinnodb: time but the database was not shut downInnoDB: normally after that.101001 19:19:27 [ERROR] Default storage engine (InnoDB) is not available101001 19:19:27 [ERROR] Aborting101001 19:19:27 [Note] D: \ MySQL5 \ bin \ mysqld-nt: Shutdown complete. Now there is only one last problem: Default storage engine (InnoDB) is not available. Go to services. msc to start the MySQL service, or an error occurs. However, the log shows InnoDB: No valid checkpoint found. innoDB: If this error appears when you are creating an InnoDB database, InnoDB: the problem may be that during an earlier attempt you managedInnoDB: to create the InnoDB data files, but log file creation failed. innoDB: If that is the case, please refer toInnoDB: http://dev.mysql.com/doc/mysql/en/Error_creating_InnoDB.html101001 20:45:09 [ERROR] Default stora Ge engine (InnoDB) is not available101001 20:45:09 [ERROR] Aborting101001 20:45:09 [Note] D: \ MySQL5 \ bin \ mysqld-nt: Shutdown complete so I searched the internet, no valid checkpoint found is displayed. solution: delete all existing ibdataN and ib_logfileN files and restart Mysql. As a result, it is enough.

InnoDB: The first specified data file D: \ MySQL InnoDB Datafiles \ ibdata1 did not exist: InnoDB: a new database to be created! 101001 21:04:24 InnoDB: Setting file D: \ MySQL InnoDB Datafiles \ ibdata1 size to 10 MBInnoDB: Database physically writes the file full: wait... 101001 21:04:25 InnoDB: Log file. \ ib_logfile0 did not exist: new to be createdInnoDB: Setting log file. \ ib_logfile0 size to 109 MBInnoDB: Database physically writes the file full: wait... innoDB: Progress in MB: 100101001 21:04:27 InnoDB: Log file. \ ib_logfile1 did not exist: new to be createdInnoDB: Setting log file. \ ib_logfile1 size to 109 MBInnoDB: Database physically writes the file full: wait... innoDB: Progress in MB: 100 InnoDB: Doublewrite buffer not found: creating newInnoDB: Doublewrite buffer createdInnoDB: Creating foreign key constraint system tablesInnoDB: Foreign key constraint system tables limit 21:04:31 InnoDB: Started; log sequence number 0 0101001 21:04:32 [Note] D: \ MySQL5 \ bin \ mysqld-nt: ready for connections. version: '5. 0.18-nt 'socket: ''port: 3306 MySQL Community Edition (GPL)
After one day of struggle, I finally successfully converted MySQL from MyISAM to the InnoDB engine. I also learned to read the Error Log File err. But I just thought about it. If I had followed the above steps from the very beginning, I don't know what would happen?

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.