Modify the default MySQL engine to innodb.
1. Stop the mysql Service
#/Etc/init. d/mysqld stop
2. Back up my. cnf
Cd/etc
Cp my. cnf my. cnf_bak
3. modify my. cnf
[Mysqld] Later
# Vi my. cnf
Default-storage-engine = InnoDB
4. Delete ib_logfile0 and ib_logfile1 in the/mysql/data directory.
Otherwise, the following error occurs when starting mysql:
[ERROR] Plugin 'innodb' init function returned error.
[ERROR] Plugin 'innodb' registry as a storage engine failed.
[ERROR] Unknown/unsupported table type: InnoDB
[ERROR] Aborting
5. Start mysql
#/Etc/init. d/mysqld start
Starting MySQL: [OK]
6. log on to mysql and check whether the modification is successful.
# Mysql-u root-p
Mysql> show variables like 'Storage _ engine ';
+ ---------------- + -------- +
| Variable_name | Value |
+ ---------------- + -------- +
| Storage_engine | InnoDB |
+ ---------------- + -------- +