MySQL does not support InnoDB Solutions

Source: Internet
Author: User

G, the solution is as follows:
In the/var/lib/MySQL directory, delete ibdata1, ib_logfile1, and ib_logfile0, and restart MySQL to recreate the above files:
Mysqladmin-uroot-P Shutdown
Sudo mysqld_safe &
Done!

Below are otherArticle. For more information, see.
In the morning, I went to the PHP site and went to test a CMS system written by someone else. I was glad to download it.ProgramAnd then copy the program to its directory. Because the program does not have install. php, it only contains a *. SQL database statement. Only the MySQL database executes this statement:
After entering the database, enter the directory where the source is located/*. SQL
At this time, the problem occurs:
Quote:CopyCodeThe Code is as follows: MySQL server error:
The 'innodb' feature is disabled; you need MySQL built with 'innodb' to have it working

Enter show variables like "have _ %" in MySQL to view the information, as shown below:Copy codeThe Code is as follows: mysql> show variables like "have _ %"
->;
+ ----------------------- + ---------- +
| Variable_name | value |
+ ----------------------- + ---------- +
| Have_archive | Yes |
| Have_bdb | no |
| Have_blackhole_engine | no |
| Have_compress | Yes |
| Have_crypt | no |
| Have_csv | no |
| Have_dynamic_loading | Yes |
| Have_example_engine | no |
| Have_federated_engine | no |
| Have_geometry | Yes |
| Have_innodb | disabled |
| Have_isam | no |
| Have_merge_engine | Yes |
| Have_ndbcluster | no |
| Have_openssl | disabled |
| Have_query_cache | Yes |
| Have_raid | no |
| Have_rtree_keys | Yes |
| Have_symlink | Yes |
+ ----------------------- + ---------- +
19 rows in SET (0.00 Sec)

Blue indicates that MySQL does not support InnoDB.

Differences Between InnoDB and MyISAM types in mysql copy Code the code is as follows: InnoDB and MyISAM are the two most commonly used table types in MySQL, each with its own advantages and disadvantages, depends on the specific application. The following are the known differences between the two.
1. InnoDB does not support Fulltext indexes.
2. innoDB does not store the specific number of rows in the table. That is to say, when you execute select count (*) from table, InnoDB needs to scan the entire table to calculate the number of rows, however, MyISAM simply needs to read the number of lines saved. Note that when the count (*) statement contains the where condition, the operations on the two tables are the same.
3. For fields of the auto_increment type, InnoDB must contain only the index of this field. However, in the MyISAM table, you can create a joint index with other fields.
4. When deleting from table, InnoDB does not create a new table, but deletes a row.
5. the load table from Master operation does not work for InnoDB. The solution is to first change the InnoDB table to the MyISAM table, and then change the imported data to the InnoDB table, however, it is not applicable to tables that use additional InnoDB features (such as foreign keys.
In addition, the row lock of the InnoDB table is not absolute. If MySQL cannot determine the scope of the scan when executing an SQL statement, the InnoDB table also locks the entire table, for example, update table set num = 1 where name like "% AAA %"
any type of table is not omnipotent. You only need to select an appropriate table type for the business type, in order to maximize the performance advantages of MySQL.
if you want to use foreign keys, transactions, and other functions, remember to use the InnoDB engine. Use the create table xxx () engine = InnoDB. If you want to use the InnoDB Engine for all created tables, you can add "default-storage-engine = InnoDB" to/etc/MySQL/My. CNF (location may be different ). After the settings are complete, you can use "show engines;" to check whether the settings are complete. However, it is said that this setting may be invalid in 5.0.22.

Search online, open my. ini file, find Skip-InnoDB, and change it to # Skip-InnoDB.

Then restart MySQL .. Solve the problem.Copy codeThe Code is as follows: mysql> show variables like "have _ %"
->;
+ ----------------------- + ---------- +
| Variable_name | value |
+ ----------------------- + ---------- +
| Have_archive | Yes |
| Have_bdb | no |
| Have_blackhole_engine | no |
| Have_compress | Yes |
| Have_crypt | no |
| Have_csv | no |
| Have_dynamic_loading | Yes |
| Have_example_engine | no |
| Have_federated_engine | no |
| Have_geometry | Yes |
| Have_innodb | Yes |
| Have_isam | no |
| Have_merge_engine | Yes |
| Have_ndbcluster | no |
| Have_openssl | disabled |
| Have_query_cache | Yes |
| Have_raid | no |
| Have_rtree_keys | Yes |
| Have_symlink | Yes |
+ ----------------------- + ---------- +
19 rows in SET (0.00 Sec)

Related Article

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.