mysql executes sql file and reports error Error: Unknown storage engine'InnoDB' solution

mysql executes sql file and reports error Error: Unknown storage engine'InnoDB' solution

Find the problem

I recently encountered a problem at work. When I ran an innoDB type sql file, I reported the error Error: Unknown storage engine 'InnoDB'. I searched for many methods on the Internet, but none of them could really solve my problem. Later, I solved it. Here I summarize the process for friends who encounter similar situations to refer to. Without further ado, let's take a look at the detailed introduction.

Solution process:

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

It was found that there was no entry for innodb:

Then we look at the log file:

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

Then: In the log we found:

The error is that the contents of the ibdata1 file are incorrect.

Next, we shut down 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 following figure

After successful deletion, 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 was added last, and the other parameters were already in the original configuration file.

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

Execute again -》show engines;

It is found that innoDB is already available, which means success.

Run the file again and it will run perfectly.

Summarize

The above is the full content of this article. I hope that the content of this article can bring some help to your study or work. If you have any questions, you can leave a message to communicate. Thank you for your support of 123WORDPRESS.COM.

You may also be interested in:
  • InnoDB type MySql restore table structure and data
  • Solution to the problem that the InnoDB engine is disabled when MySQL is started
  • Sharing of experience on repairing MySQL innodb exceptions
  • MySQL InnoDB monitoring (system layer, database layer)
  • Summary of the operation records of changing MyISAM storage engine to Innodb in MySQL
  • About MySQL innodb_autoinc_lock_mode
  • MySQL Optimization: InnoDB Optimization
  • Detailed explanation of the difference between MyISAM and InnoDB in MySQL storage engine
  • MySQL prompts that the InnoDB feature is disabled and needs to enable InnoDB. Solution
  • Tutorial on the relationship between Innodb transaction isolation level and lock in MySQL
  • Detailed explanation of InnoDB storage files in MySQL

<<:  Detailed example of changing Linux account password

>>:  Analysis on the problem of data loss caused by forced refresh of vuex

Recommend

mysql replace part of the field content and mysql replace function replace()

[mysql] replace usage (replace part of the conten...

Detailed explanation of JavaScript's Set data structure

Table of contents 1. What is Set 2. Set Construct...

Detailed explanation of DOM style setting in four react components

1. Inline styles To add inline styles to the virt...

jQuery implements shopping cart function

This article example shares the specific code of ...

How to generate Vue user interface by dragging and dropping

Table of contents Preface 1. Technical Principle ...

Some lesser-known sorting methods in MySQL

Preface ORDER BY 字段名升序/降序, I believe that everyon...

Detailed explanation of MySQL's FreeList mechanism

1. Introduction After MySQL is started, BufferPoo...

Implementing a simple Christmas game with JavaScript

Table of contents Preface Achieve results Code CS...

Several common methods of sending requests using axios in React

Table of contents Install and introduce axios dep...

Examples of using provide and inject in Vue2.0/3.0

Table of contents 1. What is the use of provide/i...

A brief analysis of the usage of HTML float

Some usage of float Left suspension: float:left; ...

Web page text design should be like smart girls wearing clothes

<br />"There are no ugly women in the w...

Example of Vue uploading files using formData format type

In Vue, we generally have front-end and back-end ...

mysql calculation function details

Table of contents 2. Field concatenation 2. Give ...

Summary of B-tree index knowledge points in MySQL optimization

Why do we need to optimize SQL? Obviously, when w...