Centos7mysql5.5 enable innodb engine _ MySQL

Source: Internet
Author: User
We used lnmp to configure a Linux + nginx + mysql + php + apache runtime environment. The mysql version we selected here is: 5542 when performing foreign key operations, we know that the default myisam does not support 1. Preface

We used lnmp to configure a Linux + nginx + mysql + php + apache runtime environment.
The mysql version is 5.5.42.

When performing foreign key operations, we know that the default myisam is not supported. Innodb is required.

2. enable the innodb engine

According to the Internet, the default engine of mysql 5.6 has become innodb, but myisam was used as the default engine.

show engines;

It can be found that there is an innodb field, but the support is no, indicating that you need to configure my. cnf to make it support innodb.

3. process 3.1 Close the mysql service
service mysql stop

3.2 modify the my. cnf file

The path of my. cnf file is in/etc/my. cnf. you only need to modify innodb-related data.

  

3.3 Restart the mysql service

  

view sourceprint?1.service mysql start

Encountered a classic problem. View the log file:/usr/local/mysql/var/localhost. localdomain. err

The log file tells us that the/usr/local/mysql/data/ibddata1 file cannot be created due to insufficient permissions.

Ie. mysql only has the r-x permission on the directory data and does not have the w permission. Modify the permission.

3.4 test


As you can see, the default mysql engine is now innodb ~ _~!!

Related Article

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.