(1) About the configuration file path
Sometimes I find that although I try to modify some variables of the configuration file, it does not take effect. It turned out that the modified file was not a configuration file read by the MySQL server.
If you don't know the profile path currently used by MySQL, you can try this:
As can be seen, the server first reads the/etc/my.cnf file, and if it finds that the file does not exist, then attempts to read from a few subsequent paths in turn.
Text command:/usr/sbin/mysqld--verbose--help | Grep-a 1 ' Default options '
(2) About configuration file configuration item segmentation
Profile my.cnf are usually divided into several parts, such as [Client],[mysqld], [MySQL], and so on. A MySQL program usually reads a segmented part with the same name as the server mysqld usually reads the related configuration item under [Mysqld]. If the configuration item location is incorrect, the configuration will not take effect. Detailed documentation I think you can refer to this article: my.cnf detailed.
(3) About global variables
Also, if you want to see some of the global variable settings for MySQL, you can view this in the case of non-login and permissions: Mysqladmin variables-p,
This operation is equivalent to logging in using the command show global variables;
"MySQL" View MySQL configuration file path and related configuration