mysql 5.6.25-1~dotdeb+7.1 trouble
Opened this issue · 5 comments
after an update i have some problems with monit that can't check my db because don't find pid,
and during the mysql start some alert about open files and more....
so i inspected the system and i founded the main process of mysql start with some parameters
that override my.cnf options
mysql 1067 0.0 9.4 522644 193024 ? Sl Jan16 3:58 _ /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib/mysql/plugin --log-error=/var/lib/mysql/
HOSTNAME.err --pid-file=/var/lib/mysql/HOSTNAME.pid
where HOSTNAME is the content of /etc/hostname
how can i avoid this issue?
thank you.
MySQL starts using the parameters from /etc/mysql/my.cnf
. This also includes any /etc/mysql/conf.d/*.cnf
files. Please review all of them and please make sure that none of them overwrite core parameters.
no, i haven't.
just one file inside the conf.d dir.
root@www:/etc/mysql/conf.d# cat mysqld_safe_syslog.cnf
[mysqld_safe]
syslog
and this is the my.cnf
root@www:/etc/mysql# cat my.cnf
[client]
port=3306
socket=/var/run/mysqld/mysqld.sock
[mysqld_safe]
socket=/var/run/mysqld/mysqld.sock
[mysqld]
bind-address=127.0.0.1
user=mysql
pid-file=/var/run/mysqld/mysqld.pid
socket=/var/run/mysqld/mysqld.sock
port=3306
basedir=/usr
datadir=/var/lib/mysql
tmpdir=/tmp
lc-messages-dir=/usr/share/mysql
log_error=/var/log/mysql/error.log
slow_query_log=1
slow_query_log_file=/var/log/mysql/log-slow-queries.log
max_connections=300
max_user_connections=30
wait_timeout=30
interactive_timeout=30
long_query_time=5
innodb_file_per_table
myisam_sort_buffer_size = 8M
read_rnd_buffer_size = 512K
net_buffer_length = 8K
read_buffer_size = 256K
sort_buffer_size = 512K
table_open_cache = 128
max_allowed_packet = 1M
key_buffer_size = 32M
query_cache_limit=1M
!includedir /etc/mysql/conf.d/
but parameters aren't those.
thank you for your time.
regards
- Run
service mysql stop
to stop MySQL - Make sure that no mysql process is running (
ps aux | grep mysql
) - Start MySQL :
service mysql start
- Please paste the the result of the
SHOW VARIABLES
SQL command and compare it to your configuration file.
i do it all.
i see strange variables [i don't set this options], like
collation_connection utf8_general_ci
collation_database latin1_swedish_ci
collation_server latin1_swedish_ci
general_log OFF
general_log_file /var/lib/mysql/www.log
log_error /var/lib/mysql/HOSTNAME.err
pid_file /var/lib/mysql/HOSTNAME.pid
slow_query_log_file /var/lib/mysql/www-slow.log
so this VAR override my my.cnf
well... i try something today....
service mysql stop
and then i launch
bash# mysqld_safe &
160121 18:05:14 mysqld_safe Can't log to error log and syslog at the same time. Remove all --log-error configuration options for --syslog to take effect.
160121 18:05:14 mysqld_safe Logging to '/var/log/mysql/error.log'.
160121 18:05:14 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql