Home  >  Article  >  Database  >  Mysql reports error when executing sql file Error: Unknown storage engine ‘InnoDB How to solve

Mysql reports error when executing sql file Error: Unknown storage engine ‘InnoDB How to solve

小云云
小云云Original
2017-12-25 14:15:044981browse

This article mainly introduces to you the solution to the error Error: Unknown storage engine 'InnoDB' when mysql executes the sql file. Friends in need can refer to it. Let's take a look together. Hope it helps everyone.

Solution process:

I am using the MySql5.5 version of the database. When the above error occurs, first use the command -》show engines; to check the engine details:

It is found that there is no innodb entry:

Then we check the log File:

If you don’t know the location of the winddowns log file, you can use the command ->show variables like '%error%'; to view

Then: In the log we found:

The error lies in the incorrect content of the ibdata1 file.

Next, we turn off the data service, delete the ibadata1 file in the installation directory, and the two files in the same directory as the error log: see the picture below

After the deletion is successful, change the my.ini file parameters.


innodb_buffer_pool_size = 256M

innodb_log_file_size  = 256M

innodb_thread_concurrency = 16

innodb_flush_log_at_trx_commit = 2

innodb_flush_method  = normal

Among them, innodb_flush_method = normal is added last, and other parameters are included in the original configuration file.

After the changes are completed, save and restart the mysql service.

Execute again-》show engines;

It is found that innoDB can be used, which means success.

Run the file just now and it will run perfectly.

Related recommendations:

mysql data migration related issues, all .frm files report errors·

mysql import sql file Error ERROR 2013 2006 2002

MySQL import file error and garbled characters_MySQL

The above is the detailed content of Mysql reports error when executing sql file Error: Unknown storage engine ‘InnoDB How to solve. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn