Mysql does not support InnoDB solutions _mysql

Source: Internet
Author: User
After G, the solution is as follows:
/var/lib/mysql directory, delete ibdata1, Ib_logfile1, IB_LOGFILE0, and then restart MySQL to rebuild the files above:
Mysqladmin-uroot-p shutdown
sudo mysqld_safe &
Get!

The following are other articles on the network. We can also refer to the following.
Wake up in the morning, go to the PHP site to look at the next, ready to test others write a CMS system, happy to download the program, and then copy the program to the directory. Because the program does not install.php, contains only a *.SQL database statement, only to the MySQL database to execute this statement:
After entering the database, enter the directory where source is located/*.sql
This time the problem arises:
QUOTE:
Copy Code code as follows:

MySQL Server Error:
The ' InnoDB ' feature is disabled; You are need MySQL built with ' InnoDB ' to have it working

Enter show variables like "have_%" in MySQL to see the following:
Copy Code code 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 |
+-----------------------+----------+
Rows in Set (0.00 sec)

Blue means that my MySQL does not support InnoDB.


Differences between the types of InnoDB and MyISAM in MySQL
Copy Code code as follows:

InnoDB and MyISAM are the most commonly used two table types in MySQL, each with its own pros and cons, depending on the specific application. The following is a known difference between the two, for informational purposes only.
The fulltext type index is not supported for 1.InnoDB.
The number of rows in the table is not saved in 2.InnoDB, that is, when the select count (*) from table is executed, InnoDB scans the entire table to calculate the number of rows, but MyISAM simply reads out the saved rows. Note that when the COUNT (*) statement contains the Where condition, the operations of the two tables are the same.
3. For Auto_increment type fields, the InnoDB must contain only the index of the field, but in the MyISAM table, you can establish a federated index with the other fields.
4.DELETE from table, InnoDB does not re-establish the table, but deletes one row at a time.
5.LOAD table from Master does not work for InnoDB, the solution is to first change the InnoDB table to MyISAM table, import the data and then change to InnoDB table, but for the use of additional InnoDB features (such as foreign key) of the table does not apply.
In addition, row locks on innodb tables are not absolute, and if MySQL cannot determine the range to scan when executing an SQL statement, the InnoDB table also locks the entire table, such as Update table set num=1 where name like "%aaa%"
Any kind of table is not omnipotent, only appropriate for the business type to choose the appropriate table type, in order to maximize the performance of MySQL advantage.
If you want to use a foreign key, transaction and other functions, remember to use the InnoDB engine. Use the method is create table xxx () Engine=innodb, if you want to all the established tables with InnoDB engine, you can add "Default-storage-engine=innodb" to/etc/mysql/ MY.CNF (location may be different). You can use "show engines" after you set it up. Check to see if the settings are OK. However, it is said that the setting may not be valid under 5.0.22.

Online Search, open my My.ini file, find Skip-innodb, change to #skip-innodb.

After that, restart MySQL. Solve the problem.
Copy Code code 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 |
+-----------------------+----------+
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.