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.