MySQL configuration file (my.cnf) file location depends on the operating system or installation method. There is no command available to trace this file location on your system. In this tutorial, you will get some default locations of the my.cnf file.
Advertisement
- /etc/my.cnf
- /etc/mysql/my.cnf
- $MYSQL_HOME/my.cnf
- [DATADIR]/my.cnf
- ~/.my.cnf
In case my.cnf file is available in more than one place, the system load each file and overrides configuration values.
2 Comments
Refer to:
https://mariadb.com/kb/en/mariadb/configuring-mariadb-with-mycnf/#configuration-syntax-and-groups
… You can see for each program which configuration files and groups it reads by executing program-name –help –verbose
sh> mysqld –help –verbose
Regards
Hi,
I wonder whether the excerpted lines from the output of the following command is system dependent:
mysqld –help –verbose
…
Default options are read from the following files in the given order:
/etc/my.cnf …