[Mysql] Mysql 5.1.46 enables the InnoDB engine and 5.1.46innodb
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. I will list them for your reference.
1. System Environment
System: CentOS release 5.4 (Final) software: MySQL-server-community-5.1.46-1.rhel5MySQL-shared-compat-5.1.37-0.rhel5MySQL-client-community-5.1.46-1.rhel5
2. Enable InnoDB to report errors
Add the following content to the configuration file # cat/etc/my. cnfdefault-storage-engine = innodbdefault-table-type = innodbdefault-character-set = utf8character-set-server = utf8collation-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 _ % "; + records + ---------- + | Variable_name | Value | + records + ---------- + | 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 | DISABLED | YES | have_ssl | DISABLED | | have_symlink | YES | + ------------------------- + ---------- + 14 rows in set (0.00 sec)
An ERROR occurred while initializing the innodb PLUGIN: 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;