MySQL 5.5.42 change data Catalog CentOS 6.5 environment

Source: Internet
Author: User

1, new data directory, check the directory is the host permissions, under normal circumstances belong to the MySQL group, MYQL users, because we install MySQL will create a new account and group.

2, the directory permission check is complete, stop the database service.

3, mobile Data directory, I use the MV command to move directly to the new directory.

4, change the configuration file content, mainly has

4.1 The sock path of the client block and the MYSQLD block, and changes to the new path.

4.2 Mysqld Block Check if there is a datadir directory, if no boot is unsuccessful, do not add the configuration item DataDir = new Data Directory

4.3 If you are the Inodb engine, down something else there are 2 Inodb path settings changed.

5. Start the MySQL service

6, ps-ef |grep mysql check the MySQL service directory is correct, such as PID directory, sock directory, DataDir directory and Err directory is the directory you want.

MySQL 5.5.42 change data Catalog CentOS 6.5 environment

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.