Fedora mysql log dir is /var/log/mariadb

/var/log/mysql does not exists on f20, f19, rhel7 by default,
but the /var/log/mariadb exists.

Change-Id: I0def3eaead491a00e6f8467db6b31502b9376188
This commit is contained in:
Attila Fazekas 2014-04-30 11:57:22 +02:00
parent 527f21c7e7
commit 3b53aebabd

View File

@ -47,6 +47,7 @@ function recreate_database_mysql {
}
function configure_database_mysql {
local slow_log
echo_summary "Configuring and starting MySQL"
if is_ubuntu; then
@ -92,7 +93,11 @@ function configure_database_mysql {
if [[ "$DATABASE_QUERY_LOGGING" == "True" ]]; then
echo_summary "Enabling MySQL query logging"
if is_fedora && ! [[ $DISTRO =~ (rhel6) ]]; then
slow_log=/var/log/mariadb/mariadb-slow.log
else
slow_log=/var/log/mysql/mysql-slow.log
fi
sudo sed -e '/log.slow.queries/d' \
-e '/long.query.time/d' \
-e '/log.queries.not.using.indexes/d' \
@ -102,7 +107,7 @@ function configure_database_mysql {
# 0 seconds) and log all non-indexed queries
sudo bash -c "source $TOP_DIR/functions && \
iniset $MY_CONF mysqld slow-query-log 1 && \
iniset $MY_CONF mysqld slow-query-log-file /var/log/mysql/mysql-slow.log && \
iniset $MY_CONF mysqld slow-query-log-file $slow_log && \
iniset $MY_CONF mysqld long-query-time 0 && \
iniset $MY_CONF mysqld log-queries-not-using-indexes 1"