Modify the default MySQL engine to innodb.

Source: Internet
Author: User

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 |

+ ---------------- + -------- +

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.