Fix slow log path and xtradb/innodb engine

slow log location is /var/log/mysql/mysql-slow.log
mariadb 10.0.9+ uses xtradb as the default engine, a forked version
of innodb (percona uses xtradb).
https://mariadb.com/kb/en/mariadb/xtradb-and-innodb/
This commit is contained in:
Rafael Folco 2016-05-23 16:20:50 +00:00
parent 5986e05c6f
commit dd5fb9194b
1 changed files with 3 additions and 3 deletions

View File

@ -21,17 +21,17 @@ function configure_mariadb {
# Now update ``my.cnf`` for some local needs and restart the mysql service
# Change bind-address from localhost (127.0.0.1) to any (::) and
# set default db type to InnoDB
iniset -sudo $my_conf mysqld bind-address "$SERVICE_LISTEN_ADDRESS"
iniset -sudo $my_conf mysqld sql_mode STRICT_ALL_TABLES
iniset -sudo $my_conf mysqld default-storage-engine InnoDB
# Do not set InnoDB, XtraDB is the default (forked engine from percona)
#iniset -sudo $my_conf mysqld default-storage-engine InnoDB
iniset -sudo $my_conf mysqld max_connections 1024
iniset -sudo $my_conf mysqld query_cache_type OFF
iniset -sudo $my_conf mysqld query_cache_size 0
if [[ "$DATABASE_QUERY_LOGGING" == "True" ]]; then
echo_summary "Enabling MySQL query logging"
slow_log=/var/log/mariadb/mariadb-slow.log
slow_log=/var/log/mysql/mysql-slow.log
sudo sed -e '/log.slow.queries/d' \
-e '/long.query.time/d' \
-e '/log.queries.not.using.indexes/d' \