1
votes

I need to increase MySql memory for innodb but i cannot find the variable "innodb_buffer_pool_size". I have Ubuntu 18.04 installed and MySQL 5.7 In stackoverflow, some posts says to modify the my.cnf file and increase the variable "innodb_buffer_pool_size", but I don't find the variable.

In my Ubuntu server, here is my my.cnf file (etc/mysql/my.cnf):

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

This is my /etc/mysql/conf.d/mysql.cnf

[mysql]

And this is /etc/mysql/mysql.conf.d/mysqld.cnf

[mysqld]
pid-file    = /var/run/mysqld/mysqld.pid
socket      = /var/run/mysqld/mysqld.sock
datadir     = /var/lib/mysql
log-error   = /var/log/mysql/error.log
# By default we only accept connections from localhost
bind-address = *
# Disabling symbolic-links is recommended to prevent assorted security risks
symbolic-links=0
default_password_lifetime = 0
1

1 Answers

1
votes

Not every config variable is in the file.

Variables that are not present in the file are given a default value that is compiled into the mysqld binary.

In the case of innodb_buffer_pool_size, the default is 134217728 (see https://dev.mysql.com/doc/refman/8.0/en/innodb-parameters.html#sysvar_innodb_buffer_pool_size).

To set a non-default value, you must add a line to one of the config files.

You may also want to create a new config file for your local config customizations. You can put the file under either of the .d directories named in the !includedir directives. If you create a new config file, remember to put the setting under the option heading [mysqld].