I have searched all over but couldn't find where service mysqld restart picks up the configuration file from:
sudo find / -name "*.cnf" | grep my
/usr/share/doc/mysql-community-server-5.6.33/my-default.cnf
/usr/share/mysql/my-default.cnf
/var/lib/mysql/auto.cnf
/var/lib/mysql/my.cnf
/etc/my.cnf
My MySQL 5.6.33 is running on 1 GB of InnoDB Buffer Pool whereas none of these files has that setting. I have setting
[mysqld]
innodb_buffer_pool_size = 4G
in the file copied from /usr/share/mysql/my-default.cnf to /etc/my.cnf – I did this:
service mysqld restart --defaults-file=/etc/my.cnf
Still not working.
Best Answer
Service mysqld start --defaults-file=..
AFAIK it isn't correct way to pass argument. It should not be accepting that argument. Never done that; importantly it isn't even necessary for default location!!!
mysqld –verbose –help | grep -C1 my.cnf
grep innodb_buffer_pool_size /etc/my.cnf
InnoDB: Initializing buffer pool size = ...