Ubuntu – Why is /etc/thesql/the.cnf EMPTY


I am trying to edit the my.cnf file to allow remote access and ultimately using software from my Windows Server to configure scheduled backup for MySQL Server.

I was following these instructions.
However, the /etc/mysql/my.cnf file on my Ubuntu has only:

# The MySQL database server configuration file.
# You can copy this to one of:
# - "/etc/mysql/my.cnf" to set global options,
# - "~/.my.cnf" to set user-specific options.
# One can use all long options that the program supports.
# Run program with --help to get a list of available options and with
# --print-defaults to see which it would actually understand and use.
# For explanations see
# http://dev.mysql.com/doc/mysql/en/server-system-variables.html

# * IMPORTANT: Additional settings that can override those from this file!
#   The files must end with '.cnf', otherwise they'll be ignored.

!includedir /etc/mysql/conf.d/
!includedir /etc/mysql/mysql.conf.d/

It doesn't contain any configuration that I can edit. Why is it like that?

Best Answer

Firstly, as A.B. rightly points out, the file is not empty. It has two rather important directives, namely

!includedir /etc/mysql/conf.d/
!includedir /etc/mysql/mysql.conf.d/

Those lines are saying that additional configuration files (.cnf in this case) can be found in the directories listed:


The latter of the two directories should contain mysqld.cnf. In other words, the appropriate configuration file should be:

Related Question