Centos 7 MySQL 5.5 enable InnoDB engine

Source: Internet
Author: User

1. Preface

We originally used LNMP to configure a Linux + nginx + mysql + PHP + Apache operating environment.
The MySQL version information we use here is: 5.5.42

In the foreign key operation, we know that the default MyISAM is not supported. Need to use InnoDB.

2. Turn on the InnoDB engine

Online, MySQL 5.6 default engine has become InnoDB, but the previous use of MyISAM as the default engine.

show engines;


It can be found that there is a INNODB field, but support is no, indicating the need to configure MY.CNF to enable him to InnoDB.

3. Process 3.1 Close MySQL service
stop
3.2 Modify MY.CNF File

The my.cnf file path is in/etc/my.cnf, as long as the data related to InnoDB is modified.

3.3 Restart MySQL Service
start

Encounter a classic problem. Then go to view the log file:/usr/local/mysql/var/localhost.localdomain.err

The log file tells us that the permissions are insufficient to create the/usr/local/mysql/data/ibddata1 file.

ie, user MySQL to directory data only R-x permissions, no W permissions. Then modify the permissions just fine.

3.4 Testing


As you can see, the default engine of MySQL now becomes InnoDB ~_~!!

Centos 7 MySQL 5.5 enable InnoDB engine

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.