As we all know, the default engine of MySQL5.1.46 is Myisam. How can I enable the InnoDB engine? I encountered many errors when installing the database and enabling the InnoDB engine.
As we all know, MySQL 5.1.46 uses the default engine Myisam. How can I enable the InnoDB engine? I encountered many errors when installing the database and enabling the InnoDB engine.
As we all know, MySQL 5.1.46 uses the default engine Myisam. How can I enable the InnoDB engine? I encountered many errors when installing the database and enabling the InnoDB engine. I will list them for your reference.
1. System Environment
System:
CentOS release 5.4 (Final)
Software:
MySQL-server-community-5.1.46-1.rhel5
MySQL-shared-compat-5.1.37-0.rhel5
MySQL-client-community-5.1.46-1.rhel5
2. Enable InnoDB to report errors
Add the following content to the configuration file:
# Cat/etc/my. cnf
Default-storage-engine = innodb
Default-table-type = innodb
Default-character-set = utf8
Character-set-server = utf8
Collation-server = utf8_general_ci
Startup Failure Log
# Tail-f/var/log/mysqld. log
3. troubleshooting
Check whether myql supports the InnoDB Engine
Mysql> SHOW variables like "have _ % ";
+ ------------------------- + ---------- +
| Variable_name | Value |
+ ------------------------- + ---------- +
| Have_community_features | YES |
| Have_compress | YES |
| Have_crypt | YES |
| Have_csv | YES |
| Have_dynamic_loading | YES |
| Have_geometry | YES |
| Have_innodb | NO |
| Have_ndbcluster | NO |
| Have_openssl | DISABLED |
| Have_partitioning | YES |
| Have_query_cache | YES |
| Have_rtree_keys | YES |
| Have_ssl | DISABLED |
| Have_symlink | YES |
+ ------------------------- + ---------- +
14 rows in set (0.00 sec)
An error occurred while initializing the innodb plugin.
Problem:
Mysql> install plugin InnoDB SONAME 'Ha _ innodb_plugin.so ';
ERROR 1123 (HY000): Can't initialize function 'innodb'; Plugin initialization function failed.
Solution:
Rename ibdata1, ib_datafile0, and ib_datafile1 to allow the system to regenerate the data file and two log files;
MySQL InnoDB Storage engine lock mechanism Experiment
Startup, shutdown, and restoration of the InnoDB Storage Engine
MySQL InnoDB independent tablespace Configuration
Architecture of MySQL Server layer and InnoDB Engine Layer
InnoDB deadlock Case Analysis
MySQL Innodb independent tablespace Configuration
This article permanently updates the link address: