MySQL does not take effect when modifying my. cnf configuration, mysqlmy. cnf

Source: Internet
Author: User

MySQL does not take effect when modifying my. cnf configuration, mysqlmy. cnf

This article describes how MySQL cannot modify my. cnf configuration. We will share this with you for your reference. The details are as follows:

I. Problems:

After modifying the my. cnf configuration file, it does not take effect. Why?

Ii. Reasons:

We noticed that I only modified my. cnf and did not know which file the absolute path is. That is to say, the my. cnf file in the correct path may be modified.

In MySQL, multiple my. cnf configuration files are allowed, and some may affect the entire system environment, such as/etc/my. cnf. Some can only affect individual users, for example :~ /. My. cnf.

The order in which MySQL reads my. cnf configuration files is as follows:

/Etc/my. cnf
/Etc/mysql/my. cnf
/Usr/local/mysql/etc/my. cnf
~ /. My. cnf

My. cnf in other custom paths, such as/data/mysql/yejr_3306/my. cnf

You can use the following two parameters to specify the path of the configuration file to be read from the line, whether it is the mysqld server or mysql client:

-Defaults-file = #, read only the specified file (No other configuration files are read)

-Defaults-extra-file = #, after reading the global configuration from other configuration files with higher priority, then read the specified configuration file (some options can overwrite the set value of the global configuration slave)

Therefore, we can see that if you modify my. cnf, which may not seem effective, must be specified by yourself, or stored in/etc/my. under cnf, you can manage multiple instances.

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.