Где находится MySQL 5.7 my.cnf файл?

в Ubuntu у меня.cnf файл MySQL 5.6 в /etc/my.cnf. Но я не могу найти тот же файл MySQL 5.7. Где я могу это найти?

Я сделал находку во всем / (root). Но я нигде не мог его найти. Есть зацепки?

Я пытаюсь установить значение max_connections.

2 ответов


в MySQL 5.7 cnf по умолчанию находится в:

/etc/mysql/mysql.conf.d/mysqld.cnf

mysql --help, напечатанный ниже.

Default options are read from the following files in the given order:
/etc/my.cnf /etc/mysql/my.cnf ~/.my.cnf 

The following groups are read: mysql client
The following options may be given as the first argument:
--print-defaults        Print the program argument list and exit.
--no-defaults           Don't read default options from any option file,
                        except for login file.
--defaults-file=#       Only read default options from the given file #.
--defaults-extra-file=# Read this file after the global files are read.
--defaults-group-suffix=#
                        Also read groups with concat(group, suffix)
--login-path=#          Read this path from the login file.