I am trying to increase the size of the innodb_buffer_pool_size in MySQL 5.1 as I keep running into the following error indicating I have run out of space for the table lock
As stated,
innodb_buffer_pool_size=50M
Following the convention on the other predefined variables, make sure there is no space either side of the equals sign.
Then run
sudo service mysqld stop
sudo service mysqld start
Note
Sometimes, e.g. on Ubuntu, the MySQL daemon is named mysql
as opposed to mysqld
I find that running /etc/init.d/mysqld restart
doesn't always work and you may get an error like
Stopping mysqld: [FAILED]
Starting mysqld: [ OK ]
To see if the variable has been set, run show variables
and see if the value has been updated.
In the earlier versions of MySQL ( < 5.7.5 ) the only way to set
'innodb_buffer_pool_size'
variable was by writing it to my.cnf (for linux) and my.ini (for windows) under [mysqld] section :
[mysqld]
innodb_buffer_pool_size = 2147483648
You need to restart your mysql server to have it's effect in action.
As of MySQL 5.7.5, the innodb_buffer_pool_size configuration option can be set dynamically using a SET statement, allowing you to resize the buffer pool without restarting the server. For example:
mysql> SET GLOBAL innodb_buffer_pool_size=402653184;
Reference : https://dev.mysql.com/doc/refman/5.7/en/innodb-buffer-pool-resize.html
add this to your my.cnf
innodb_buffer_pool_size=1G
restart your mysql to make it effect
For standard OS X installations of MySQL you will find my.cnf located in the /etc/ folder.
Steps to update this variable:
cd /etc/
.sudo vi my.cnf
.sudo find / -name 'my.cnf' 2>1
- this will hide the errors and only report the successfile file location).innodb_buffer_pool_size
, press i
to start making changes.wq
.I had to put the statement under the [mysqld] block to make it work. Otherwise the change was not reflected. I have a REL distribution.