Mysql enable error logging

Was attempting to get the mysql error_log to work. The issue was that skip_log_error was being passed as mysqld param.

Using mariadb

# Is error_log set
$ cat /etc/mysql/mariadb.conf.d/50-server.cnf | grep log_error

[mysqld]
log_error = /var/log/mysql/error.log

# Is skip_log_error removed or commented out
$ cat /etc/mysql/mariadb.conf.d/50-mysqld_safe.cnf | grep skip_log_error

[mysqld_safe]
#skip_log_error

# You may already have mysqld running with skip-log-error param which will prevent error_log from working
$ ps aux | grep skip-log-error

mysql    29703  0.0  1.4 662768 168708 ?       Sl   May01   0:36 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib/mysql/plugin --user=mysql --skip-log-error --pid-file=/var/run/mysqld/mysqld.pid --socket=/var/run/mysqld/mysqld.sock --port=3306

http://x-v.it/09i2ls

# stop mysqld by killing process
$ kill 29703

# restart mysql
$ sudo /etc/init.d/mysql restart

# view log variables to determine if working
$ mysql -uUsername -pPassword -se "SHOW VARIABLES" | grep -e log_error -e general_log -e slow_query_log
mysql some log variables