Where is the MySQL 5.7 my.cnf file located?

In Ubuntu, I had a my.cnf file from MySQL 5.6 in /etc/my.cnf. But I can not find the same MySQL 5.7 file. How can I find this?

I found the whole search / (root). But I could not find him anywhere. Any clues?

I am trying to set the value of max_connections.

+4
source share
2 answers

mysql --help listed below.

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.
+5
source

In MySQL 5.7, the default cnf value is:

/etc/mysql/mysql.conf.d/mysqld.cnf
+13
source

Source: https://habr.com/ru/post/1648572/


All Articles