Reputation: 4349
My mariadb configuration in my.cnf is not getting loaded for "log-error"
and "pid-file"
. I have checked other configurations params are loaded.
[root@kvm10 ~]# cat /etc/my.cnf
[mysqld]
!includedir /etc/mysqld/conf.d
datadir=/mnt/mgmt/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
tmpdir=/mnt/mgmt/var/lib/mysql_tmp
user=mysql
# Disabling symbolic-links is recommended to prevent assorted security risks
symbolic-links=0
### TRT-3229 #####
sync_binlog=1
innodb_flush_method=O_DIRECT
innodb_support_xa = 1
myisam_repair_threads = 2
myisam_recover_options = FORCE
###################
innodb_file_per_table=1
innodb_log_buffer_size = 8M
table_open_cache=256
max_heap_table_size=256M
### TRT-4685 ###
max_connections=500
################
innodb_log_file_size = 512M
[mysqld_safe]
log-error=/var/log/mariadb/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
[root@kvm10 ~]#
But the configuration value for log-error
& pid-file
is not picked by MariaDB.
[root@kvm10 ~]# mysql -e "show variables like 'pid_file'"
+---------------+-----------------------------------+
| Variable_name | Value |
+---------------+-----------------------------------+
| pid_file | /mnt/mgmt/var/lib/mysql/kvm10.pid |
+---------------+-----------------------------------+
[root@kvm10 ~]# mysql -e "show variables like 'log_error'"
+---------------+-------+
| Variable_name | Value |
+---------------+-------+
| log_error | |
+---------------+-------+
[root@kvm10 ~]#
Am I missing somethig or making some mistake. I have checked the files permissions in /var/log/mariadb/mysqld.log
& /var/run/mysqld/mysqld.pid
.
Upvotes: 0
Views: 5827
Reputation: 3987
These options from the config file should be picked up if you start the server by running mysqld_safe
, either directly or via the old-style init script (MariaDB 5.5/10.0 or older Linux distributions). If you have MariaDB 10.1+ and Linux distributions with systemd
support and start MariaDB server via the service, mysqld_safe
is not used.
Another reason why they might not work is if you start mysqld_safe
without --defaults-file
option, and there is another config file somewhere else in default locations which overrides these options.
1) Add the options to [mysqld]
section of the config file, restart the server and see if it helps.
If it doesn't help,
2a) if you run MariaDB server via systemd
service, check the service configuration, maybe there is something in there;
2b) if you run MariaDB server via mysqld_safe
, try to start it with --defaults-file=/etc/my.cnf
, to make sure that this, only only this config file is used.
Upvotes: 1