[MySQL] view MySQL configuration file path and related configuration

Source: Internet
Author: User
(1) For the configuration file path, sometimes I find that although I tried to modify some variables in the configuration file, they did not take effect. It was later discovered that the modified file was not the configuration file read by the MySQL server. If you do not know the path of the configuration file currently used by MySQL, you can view it as follows: the server first reads the etc

(1) For the configuration file path, sometimes I find that although I tried to modify some variables in the configuration file, they did not take effect. It was later discovered that the modified file was not the configuration file read by the MySQL server. If you do not know the path of the configuration file currently used by MySQL, you can view it as follows: the server first reads/etc

(1) about the configuration file path

Sometimes, although I tried to modify some variables in the configuration file, they did not take effect. It was later discovered that the modified file was not the configuration file read by the MySQL server.

If you do not know the path of the configuration file currently used by MySQL, try to view it as follows:

As you can see, the server first reads the/etc/my. cnf file. If the file does not exist, it tries to read it from the following paths.


(2) configuration item Segmentation

The configuration file my. cnf is usually divided into several parts, such as [client], [mysqld], and [mysql. MySQL programs generally read segments with the same name. For example, the server mysqld reads the configuration items under the [mysqld] segment. If the location of the configuration item is incorrect, the configuration will not take effect. For more information, see my. cnf.


(3) about global variables

In addition, if you want to view some global variable settings of MySQL, you can view mysqladmin variables-p without logon and permission,

This operation is equivalent to running the show global variables command during logon;


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.