MySQL does not support InnoDB solution _ MySQL

Source: Internet
Author: User
MySQL does not support InnoDB solution bitsCN. comG. 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!

The following are other articles on the Internet. 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 happily downloaded the program and copied it to the 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:

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:

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

InnoDB and MyISAM are the two most commonly used table types in MySQL, each with its own advantages and disadvantages, depending 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 to be scanned when executing an SQL statement, the InnoDB table will also lock 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 a proper table type for the business type to maximize the performance advantage 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.

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)
BitsCN.com

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.