Merge pull request #3250 from vpeter4/mariadb

mariadb: config file fix to speed it up
This commit is contained in:
CvH 2019-01-22 11:22:26 +01:00 committed by GitHub
commit bbb8e6d460
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 24 additions and 11 deletions

View File

@ -1,2 +1,8 @@
101
- update MariaDB to 10.3.12
removed optimizer_search_depth from config file to speed it up
moved some paths for logs to addon home
added alias for service name (mariadb == service.mariadb)
100 100
- initial version - initial version

View File

@ -2,9 +2,9 @@
# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv) # Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)
PKG_NAME="mariadb" PKG_NAME="mariadb"
PKG_VERSION="10.3.11" PKG_VERSION="10.3.12"
PKG_REV="100" PKG_REV="101"
PKG_SHA256="211655b794c9d5397ba3be6c90737eac02e882f296268299239db47ba328f1b2" PKG_SHA256="f7449a34c25e0455928d7983dae83fd2069fe1f16c4c5f4aeed9ed9d3f081ff6"
PKG_LICENSE="GPL2" PKG_LICENSE="GPL2"
PKG_SITE="https://mariadb.org" PKG_SITE="https://mariadb.org"
PKG_URL="https://downloads.mariadb.org/interstitial/${PKG_NAME}-${PKG_VERSION}/source/${PKG_NAME}-${PKG_VERSION}.tar.gz" PKG_URL="https://downloads.mariadb.org/interstitial/${PKG_NAME}-${PKG_VERSION}/source/${PKG_NAME}-${PKG_VERSION}.tar.gz"

View File

@ -42,6 +42,7 @@ if [ ! -d "$ADDON_HOME/data/mysql" ]; then
fi fi
# init script to create user kodi and change passwords # init script to create user kodi and change passwords
init_file=""
if [[ ! -f $ADDON_DIR/set_mysql_passwords.sql ]] || [[ $CUR_XML -nt $ADDON_DIR/set_mysql_passwords.sql ]]; then if [[ ! -f $ADDON_DIR/set_mysql_passwords.sql ]] || [[ $CUR_XML -nt $ADDON_DIR/set_mysql_passwords.sql ]]; then
cat << SQL_DATA > $ADDON_DIR/set_mysql_passwords.sql cat << SQL_DATA > $ADDON_DIR/set_mysql_passwords.sql
SET PASSWORD FOR 'root'@'localhost'=PASSWORD('$MYSQL_ROOT_PASS'); SET PASSWORD FOR 'root'@'localhost'=PASSWORD('$MYSQL_ROOT_PASS');

View File

@ -89,7 +89,7 @@ query_cache_size = 64M
# Both location gets rotated by the cronjob. # Both location gets rotated by the cronjob.
# Be aware that this log type is a performance killer. # Be aware that this log type is a performance killer.
# As of 5.1 you can enable the log at runtime! # As of 5.1 you can enable the log at runtime!
#general_log_file = /var/log/mysql/mysql.log #general_log_file = /storage/.kodi/userdata/addon_data/service.mariadb/mysql.log
#general_log = 1 #general_log = 1
# #
# Error logging goes to syslog due to /etc/mysql/conf.d/mysqld_safe_syslog.cnf. # Error logging goes to syslog due to /etc/mysql/conf.d/mysqld_safe_syslog.cnf.
@ -99,7 +99,7 @@ log_warnings = 2
# #
# Enable the slow query log to see queries with especially long duration # Enable the slow query log to see queries with especially long duration
#slow_query_log[={0|1}] #slow_query_log[={0|1}]
slow_query_log_file = /var/log/mysql/mariadb-slow.log slow_query_log_file = /storage/.kodi/userdata/addon_data/mariadb-slow.log
long_query_time = 10 long_query_time = 10
#log_slow_rate_limit = 1000 #log_slow_rate_limit = 1000
log_slow_verbosity = query_plan log_slow_verbosity = query_plan
@ -115,16 +115,16 @@ log_slow_verbosity = query_plan
#auto_increment_increment = 2 #auto_increment_increment = 2
#auto_increment_offset = 1 #auto_increment_offset = 1
# disable binary log # disable binary log
#log_bin = /var/log/mysql/mariadb-bin #log_bin = /storage/.kodi/userdata/addon_data/service.mariadb/mariadb-bin
#log_bin_index = /var/log/mysql/mariadb-bin.index #log_bin_index = /storage/.kodi/userdata/addon_data/service.mariadb/mariadb-bin.index
# not fab for performance, but safer # not fab for performance, but safer
#sync_binlog = 1 #sync_binlog = 1
expire_logs_days = 10 expire_logs_days = 10
max_binlog_size = 100M max_binlog_size = 100M
# slaves # slaves
#relay_log = /var/log/mysql/relay-bin #relay_log = /storage/.kodi/userdata/addon_data/service.mariadb/relay-bin
#relay_log_index = /var/log/mysql/relay-bin.index #relay_log_index = /storage/.kodi/userdata/addon_data/service.mariadb/relay-bin.index
#relay_log_info_file = /var/log/mysql/relay-bin.info #relay_log_info_file = /storage/.kodi/userdata/addon_data/service.mariadb/relay-bin.info
#log_slave_updates #log_slave_updates
#read_only #read_only
# #
@ -160,7 +160,8 @@ innodb_io_capacity = 400
innodb_flush_method = O_DIRECT innodb_flush_method = O_DIRECT
character-set-server=utf8 # This avoids potential pitfalls with text in exotic codepages. character-set-server=utf8 # This avoids potential pitfalls with text in exotic codepages.
#skip-name-resolve # Avoids name resolving in the local network, thus reducing overhead. That also means that all connections are done by IP only. #skip-name-resolve # Avoids name resolving in the local network, thus reducing overhead. That also means that all connections are done by IP only.
optimizer_search_depth=1 # Here we are, this is winner of the year. # well, not really according to use cases :(
#optimizer_search_depth=0 # Here we are, this is winner of the year.
# #
# * Security Features # * Security Features

View File

@ -0,0 +1,4 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)
export MYSQL_HISTFILE=/storage/.kodi/userdata/addon_data/service.mariadb/mysql_history

View File

@ -15,4 +15,5 @@ RestartSec=10
StartLimitInterval=0 StartLimitInterval=0
[Install] [Install]
Alias=mariadb.service
WantedBy=kodi.service WantedBy=kodi.service