I want to increase following parameters for mysql Ver 8.0.27-0ubuntu0.20.04.1 for Linux on x86_64 ((Ubuntu))
innodb_buffer_pool_size=512M (default 96M)
innodb_thread_concurrency=25 (default 8)
max_connections=200 (default 100)
thread_cache_size=25 (default 10)
My /etc/mysql/my.cnf
just have pointers to two other dir..
!includedir /etc/mysql/conf.d/
!includedir /etc/mysql/mysql.conf.d/
And
ls /etc/mysql/conf.d/
mysql.cnf mysqldump.cnf
Where
ls /etc/mysql/mysql.conf.d/
mysql.cnf mysqld.cnf
Which file I should add those innodb
etc entries?
CodePudding user response:
InnoDB options would only apply to mysqld, so I would put the options you show into /etc/mysql/mysql.conf.d/mysqld.conf
, assuming that's the option file with a [mysqld]
section.
But ultimately, all the option files will be read, and all options in the [mysqld]
section, regardless of which file they appear in, will take effect.
So it's really up to you how you want to organize your own config. The only reason to separate the files is so you can find the options you're setting, or deploy different option files in different environments.
CodePudding user response:
If you run:
root@ergesttstsrv:~# mysql --help
in your Linux terminal in the middle of result page you will get something like:
Default options are read from the following files in the given order:
/etc/my.cnf /etc/mysql/my.cnf ~/.my.cnf
You will find the order in which your .cnf
file is read