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.

Share.

2 Comments

  1. 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 …

Leave A Reply