Add MySQL query logging if DEBUG is set

This commit is contained in:
Disassembler 2017-12-08 07:51:56 +01:00
parent 03e21dfbfe
commit 8c4698fdff

View File

@ -143,6 +143,14 @@ systemctl restart postgresql
# Install packages
apt-get -y --no-install-recommends install mariadb-server
# Enable query logging. Only if the DEBUG environment variable is set
if [ ${DEBUG:-0} -eq 1 ]; then
sed -i 's/#general_log/general_log/g' /etc/mysql/mariadb.conf.d/50-server.cnf
fi
# Restart
systemctl restart mysqld
#####
# Tomcat