The Issue
I'm trying to modify a my.cnf value on my production server but the changes aren't taking effect after a sudo service mysql restart
, using an exact copy of the my.cnf (downloaded and replaced original) on my development server the changes made are visible from show variables in mysql commandline.
my.cnf is located at /etc/mysql/my.cnf
sudo find / -name my.cnf
/etc/mysql/my.cnf
So only one file exists on the entire system..
Production is ubuntu 10.04 LTS 64bit
Development is ubuntu 11.10 32bit
Mysql versions are 5.1.61 & 5.1.62 respectively.
Update 2 :
After running mysql stop and mysql status return mysql stop/waiting, if i run top -b | grep mysql
27652 root 20 0 4096 424 420 S 0 0.0 0:00.01 mysqld_safe
27769 mysql 20 0 392m 57m 7236 S 0 1.5 119116,08 mysqld
This looks like its still running and the time doesnt look good to me, but I'm now worried if i kill these/this process I wont be able to get mysql running again, and being production this is bad :S.
I realise it's probably not something that can be answered but killing these processes and then running service mysql start, will this have mysql running again? - Also, do the proccesses above have normal numbers for them?
Update:
Doesn't this imply its getting the settings from my.cnf... but not using it? So very confused right now.
At the end its got the innodb_buffer.. settings.
mysqld --print-defaults
mysqld would have been started with the following arguments:
--user=mysql --socket=/var/run/mysqld/mysqld.sock --port=3306 --basedir=/usr --datadir=/var/lib/mysql --tmpdir=/tmp --skip-external-locking --bind-address=127.0.0.1 --key_buffer=16M --max_allowed_packet=16M --thread_stack=192K --thread_cache_size=8 --myisam-recover=BACKUP --query_cache_limit=1M --query_cache_size=16M --log_error=/var/log/mysql/error.log --expire_logs_days=9 --max_binlog_size=100M --innodb_file_per_table=1 --innodb_buffer_pool_size=500M --innodb_buffer_pool_size=500M --user=mysql --socket=/var/run/mysqld/mysqld.sock --port=3306 --basedir=/usr --datadir=/var/lib/mysql --tmpdir=/tmp --skip-external-locking --bind-address=127.0.0.1 --key_buffer=16M --max_allowed_packet=16M --thread_stack=192K --thread_cache_size=8 --myisam-recover=BACKUP --query_cache_limit=1M --query_cache_size=16M --log_error=/var/log/mysql/error.log --expire_logs_days=9 --max_binlog_size=100M --innodb_file_per_table=1 --innodb_buffer_pool_size=500M --innodb_buffer_pool_size=500M
my.cnf
[client]
port = 3306
socket = /var/run/mysqld/mysqld.sock
[mysqld_safe]
socket = /var/run/mysqld/mysqld.sock
nice = 0
[mysqld]
user = mysql
socket = /var/run/mysqld/mysqld.sock
port = 3306
basedir = /usr
datadir = /var/lib/mysql
tmpdir = /tmp
skip-external-locking
bind-address = 127.0.0.1
key_buffer = 16M
max_allowed_packet = 16M
thread_stack = 192K
thread_cache_size = 8
myisam-recover = BACKUP
query_cache_limit = 1M
query_cache_size = 16M
log_error = /var/log/mysql/error.log
expire_logs_days = 10
max_binlog_size = 100M
innodb_file_per_table = 1
[mysqldump]
quick
quote-names
max_allowed_packet = 16M
[mysql]
[isamchk]
key_buffer = 16M
!includedir /etc/mysql/conf.d/
/etc/mysql/my.cnf
by runningps
?ps aux | grep mysql
. Does your mysqld uses any of the--defaults-extra-file
,--defaults-extra-file
or--no-defaults
options, which point to a different configuration file? If so, the configuration directives in that file might override the changes that you made in my.cnf.sudo service mysql stop; sudo /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --user=mysql --skip-grant-tables --pid-file=/var/lib/mysql/[url].pid --socket=/var/run/mysqld/mysqld.sock --port=[port] --defaults-file=/etc/mysql/my.cnf
.