Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where else can the variable innodb_buffer_pool_size be accessed besides my.cnf?

Tags:

mysql

innodb

I've installed MAMP and have the latest phpMyAdmin on my Mac. I do not have a my.cnf nor a my.ini file. Yes, I have enabled all invisible files.

I've heard the free version of MAMP doesn't let you, but that doesn't seem right. I know MAMPPro has a drop-down but I'm not buying that.

What else could the file be called?

EDIT: I used grep to search for innodb_buffer_pool_size within the entire MAMP folder and the only files that had that variable inside were assigning an array to it, not just a simple size. Just for more completeness on this question.

like image 458
kelly johnson Avatar asked Dec 07 '12 19:12

kelly johnson


1 Answers

You can do the following:

MySQL 5.0+

SHOW VARIABLES LIKE 'innodb_buffer_pool_size';

MySQL 5.1+

SELECT variable_value FROM information_schema.global_variables
WHERE variable_name = 'innodb_buffer_pool_size';

In order to set it for MySQL, you must have a physically manifest my.cnf or my.ini

Add this to the config file

[mysqld]
innodb_buffer_pool_size = 1G

and restart mysql

You can try placing the my.cnf in /etc and restarting mysql

Please keep in mind that 128M is the default value for innodb_buffer_pool_size in MySQL 5.5. Once you get my.cnf in the correct place in the DB Server and restart mysql, things will be different.

like image 55
RolandoMySQLDBA Avatar answered Oct 13 '22 14:10

RolandoMySQLDBA