[packages/mariadb] More updates (config from mariadb; init script adjusted (not fully yet))
arekm
arekm at pld-linux.org
Tue May 9 11:16:03 CEST 2023
commit 4fb1a4b107442acd747cf5a9b8da87963fb85000
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date: Tue May 9 11:15:54 2023 +0200
More updates (config from mariadb; init script adjusted (not fully yet))
mariadb.init | 104 ++++++++++----------
mariadb.spec | 2 +-
mariadb.sysconfig | 14 +--
mysqld.conf | 279 +++++++++++++++++++-----------------------------------
4 files changed, 160 insertions(+), 239 deletions(-)
---
diff --git a/mariadb.spec b/mariadb.spec
index 62c14f2..2926167 100644
--- a/mariadb.spec
+++ b/mariadb.spec
@@ -529,7 +529,7 @@ cd build
-DINSTALL_SYSCONF2DIR=%{_sysconfdir}/%{name}/conf.d \
-DLZ4_LIBS=%{?with_lz4:%{_libdir}/liblz4.so}%{!?with_lz4:} \
-DMYSQL_SERVER_SUFFIX="-PLD-%{version}-%{release}:%{epoch}" \
- -DMYSQL_UNIX_ADDR=/var/lib/%{name}/%{name}.sock \
+ -DMYSQL_UNIX_ADDR=/var/lib/%{name}/mysql.sock \
-DNICE_PROJECT_NAME="MariaDB" \
-DPLUGIN_AWS_KEY_MANAGEMENT=NO \
-DPLUGIN_COLUMNSTORE=NO \
diff --git a/mariadb.init b/mariadb.init
index d1b8e83..7af72f2 100644
--- a/mariadb.init
+++ b/mariadb.init
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# mysql A very fast and reliable SQL database engine
+# mariadb A very fast and reliable SQL database engine
#
# chkconfig: 2345 84 25
#
@@ -23,22 +23,22 @@ else
exit 1
fi
-if [ -n "$MYSQL_DB_CLUSTERS" ]; then
- nls "Warning: MYSQL_DB_CLUSTERS is set. It's obsolete. Use %s instead." /etc/mysql/clusters.conf
+if [ -n "$MARIADB_DB_CLUSTERS" ]; then
+ nls "Warning: MARIADB_DB_CLUSTERS is set. It's obsolete. Use %s instead." /etc/mariadb/clusters.conf
fi
-if [ -f /etc/mysql/clusters.conf ]; then
- MYSQL_DB_CLUSTERS=$(awk -F= '!/^#/{print $2}' /etc/mysql/clusters.conf)
- if [ -z "$MYSQL_DB_CLUSTERS" ]; then
+if [ -f /etc/mariadb/clusters.conf ]; then
+ MARIADB_DB_CLUSTERS=$(awk -F= '!/^#/{print $2}' /etc/mariadb/clusters.conf)
+ if [ -z "$MARIADB_DB_CLUSTERS" ]; then
nls "Warning: there are no configured clusters."
fi
else
- nls "Warning: Missing clusters config file %s" /etc/mysql/clusters.conf
- if [ -z "$MYSQL_DB_CLUSTERS" ]; then
+ nls "Warning: Missing clusters config file %s" /etc/mariadb/clusters.conf
+ if [ -z "$MARIADB_DB_CLUSTERS" ]; then
nls "Warning: there are no configured clusters."
- nls "Using default cluster /var/lib/mysql (compatibility mode)"
- MYSQL_DB_CLUSTERS=/var/lib/mysql
+ nls "Using default cluster /var/lib/mariadb (compatibility mode)"
+ MARIADB_DB_CLUSTERS=/var/lib/mariadb
fi
fi
@@ -60,9 +60,9 @@ if [ $# -gt 1 ]; then
shift
# perform action for specified clusters only
for a in "$@"; do
- # try auto resolving from /etc/mysql/clusters.conf
+ # try auto resolving from /etc/mariadb/clusters.conf
if [[ "$a" != /* ]]; then
- m=$(awk -va="$a" -F= 'substr($0, 1, length(a)) == a {print $1}' /etc/mysql/clusters.conf)
+ m=$(awk -va="$a" -F= 'substr($0, 1, length(a)) == a {print $1}' /etc/mariadb/clusters.conf)
if [ -z "$m" ]; then
echo >&2 "Cluster name '$a' did not match anything!"
exit 1
@@ -71,16 +71,16 @@ if [ $# -gt 1 ]; then
echo >&2 "Cluster name '$a' ambiguous:" $m
exit 1
fi
- a=$(awk -va="$a" -F= 'substr($0, 1, length(a)) == a {print $2}' /etc/mysql/clusters.conf)
+ a=$(awk -va="$a" -F= 'substr($0, 1, length(a)) == a {print $2}' /etc/mariadb/clusters.conf)
fi
DB_CLUSTERS="$DB_CLUSTERS $a"
done
else
- DB_CLUSTERS="$MYSQL_DB_CLUSTERS"
+ DB_CLUSTERS="$MARIADB_DB_CLUSTERS"
fi
# global error log, if mysqld.conf hasn't migrated to log-error style
-MYSQL_ERRLOG=/var/log/mysql/mysqld.log
+MYSQL_ERRLOG=/var/log/mariadb/mysqld.log
MYSQL_STOP_WAIT_TIME=${MYSQL_STOP_WAIT_TIME:-900}
#
@@ -96,7 +96,7 @@ MYSQL_STOP_WAIT_TIME=${MYSQL_STOP_WAIT_TIME:-900}
#
# sets variables:
# MYSQL_STATUS = starting | running | not running | died
-# MYSQL_PID = pid of mysqld process
+# MYSQL_PID = pid of mariadbd process
#
mysqlstatus() {
clusterdir="$1"
@@ -125,7 +125,7 @@ mysqlstatus() {
fi
if [ "$mode" = "start" ]; then
- MYSQL_GREP_PID=$(grep -lE "^/usr/sbin/mysqld.*${MYSQL_PIDFILE}" /proc/[0-9]*/cmdline 2> /dev/null | awk -F "/" '{ print $3; exit; }')
+ MYSQL_GREP_PID=$(grep -lE "^/usr/sbin/mariadbd.*${MYSQL_PIDFILE}" /proc/[0-9]*/cmdline 2> /dev/null | awk -F "/" '{ print $3; exit; }')
if [ -n "$MYSQL_GREP_PID" ]; then
MYSQL_PID=$MYSQL_GREP_PID
if grep -qa "$MYSQL_PIDFILE" /proc/$MYSQL_PID/cmdline 2> /dev/null; then
@@ -157,15 +157,15 @@ mysqlgetconfig() {
clusterdir="$1"
# emulate old behaviour if only one cluster specified
- if [ "$clusterdir" = "$MYSQL_DB_CLUSTERS" -a "$clusterdir" = "/var/lib/mysql" -a -f /etc/mysqld.conf ]; then
+ if [ "$clusterdir" = "$MARIADB_DB_CLUSTERS" -a "$clusterdir" = "/var/lib/mariadb" -a -f /etc/mysqld.conf ]; then
MYSQL_RA_COMPAT=yes
config_file=/etc/mysqld.conf
else
- config=$(awk -F= -vclusterdir="$clusterdir" '!/^#/{ if (clusterdir == $2) print $1}' /etc/mysql/clusters.conf)
+ config=$(awk -F= -vclusterdir="$clusterdir" '!/^#/{ if (clusterdir == $2) print $1}' /etc/mariadb/clusters.conf)
if [[ $config = /* ]]; then
config_file="$config"
- elif [ -f "/etc/mysql/$config" ]; then
- config_file="/etc/mysql/$config"
+ elif [ -f "/etc/mariadb/$config" ]; then
+ config_file="/etc/mariadb/$config"
else
config_file="$clusterdir/mysqld.conf"
fi
@@ -251,16 +251,16 @@ mysqlstart() {
fi
TMPDIR=/tmp nice -n ${SERVICE_RUN_NICE_LEVEL:-$DEFAULT_SERVICE_RUN_NICE_LEVEL} \
- /usr/bin/setsid /usr/sbin/mysqld \
+ /usr/bin/setsid /usr/sbin/mariadbd \
--defaults-file=$MYSQL_CONFIG \
--datadir=$MYSQL_DATA_DIR \
--pid-file=$MYSQL_PIDFILE \
$MYSQL_OPTIONS &
pid=$!
- sleep 0.1
+ sleep 0.2
mysqlstatus "$clusterdir" start
- # it takes longer for mysqld to start and create pidfile if it has to recover innodb transactions
+ # it takes longer for mariadbd to start and create pidfile if it has to recover innodb transactions
if [ "$MYSQL_STATUS" = "starting" ]; then
echo ""
show "Waiting for MariaDB to start"
@@ -297,7 +297,7 @@ mysqlstop() {
# try graceful shutdown -- send shutdown command
# requires mysql_sysadmin user proper privs
- /usr/bin/mysqladmin --defaults-file=$MYSQL_CONFIG ${MYSQL_SOCKET:+--socket=$MYSQL_SOCKET} shutdown >/dev/null 2>&1
+ /usr/bin/mariadb-admin --defaults-file=$MYSQL_CONFIG ${MYSQL_SOCKET:+--socket=$MYSQL_SOCKET} shutdown >/dev/null 2>&1
mysqlstatus "$clusterdir" stop
if [ "$MYSQL_PID" != "unknown" ]; then
@@ -376,31 +376,31 @@ mysqlinit() {
chown mysql:mysql "$MYSQL_CLUSTER_DIR/mysqldb" "$MYSQL_DATA_DIR" > /dev/null 2>&1
chmod 751 "$MYSQL_CLUSTER_DIR" "$MYSQL_CLUSTER_DIR/mysqldb"
- if [ -f /usr/share/mysql/mysqld.conf -a ! -f "$MYSQL_CLUSTER_DIR/mysqld.conf" ]; then
+ if [ -f /usr/share/mariadb/mysqld.conf -a ! -f "$MYSQL_CLUSTER_DIR/mysqld.conf" ]; then
sed -e "
s#\(datadir.*\)=.*#\1= $MYSQL_DATA_DIR#g;
s#\(pid-file.*\)=.*#\1= $MYSQL_PIDFILE#g;
s#\(socket.*\)=.*#\1= $MYSQL_SOCKET#g;
s#@clusterdir@#$MYSQL_CLUSTER_DIR#g;
- " /usr/share/mysql/mysqld.conf > "$MYSQL_CLUSTER_DIR/mysqld.conf"
+ " /usr/share/mariadb/mysqld.conf > "$MYSQL_CLUSTER_DIR/mysqld.conf"
chown root:root "$MYSQL_CLUSTER_DIR/mysqld.conf"
chmod 640 "$MYSQL_CLUSTER_DIR/mysqld.conf"
fi
- if [ ! -e /var/lib/mysql/mysql.sock ] || [ -L /var/lib/mysql/mysql.sock ] && [ -z "$(readlink /var/lib/mysql/mysql.sock)" ]; then
- sock=${MYSQL_SOCKET#/var/lib/mysql/} # make it relative if possible
- ln -s "$sock" /var/lib/mysql/mysql.sock
+ if [ ! -e /var/lib/mariadb/mysql.sock ] || [ -L /var/lib/mariadb/mysql.sock ] && [ -z "$(readlink /var/lib/mariadb/mysql.sock)" ]; then
+ sock=${MYSQL_SOCKET#/var/lib/mariadb/} # make it relative if possible
+ ln -s "$sock" /var/lib/mariadb/mysql.sock
fi
- cat > $MYSQL_DATA_DIR/mysql-init.sql <<-EOF
+ cat > $MYSQL_DATA_DIR/mariadb-init.sql <<-EOF
CREATE DATABASE mysql;
use mysql;
- $(cat /usr/share/mysql/mysql_system_tables.sql)
- $(sed -e "/@current_hostname/d" /usr/share/mysql/mysql_system_tables_data.sql)
+ $(cat /usr/share/mariadb/mysql_system_tables.sql)
+ $(sed -e "/@current_hostname/d" /usr/share/mariadb/mysql_system_tables_data.sql)
EOF
ok=0
- /usr/sbin/mysqld \
+ /usr/sbin/mariadbd \
--defaults-file=$MYSQL_CLUSTER_DIR/mysqld.conf \
--bootstrap \
--skip-grant-tables \
@@ -409,11 +409,11 @@ EOF
--slave-load-tmpdir=$MYSQL_DATA_DIR \
--tmpdir=$MYSQL_DATA_DIR \
--log-error=$MYSQL_ERRLOG \
- < $MYSQL_DATA_DIR/mysql-init.sql && ok=1
- [ -f $MYSQL_DATA_DIR/mysql/host.frm ] || ok=0
+ < $MYSQL_DATA_DIR/mariadb-init.sql && ok=1
+ [ -f $MYSQL_DATA_DIR/mysql/db.frm ] || ok=0
if [ "$ok" = 1 ]; then
- rm -f $MYSQL_DATA_DIR/mysql-init.sql
+ rm -f $MYSQL_DATA_DIR/mariadb-init.sql
ok
cat << END_OF_MSG
@@ -422,20 +422,20 @@ This is done, after starting database, in the order shown,
with:
For 'mysql_sysadmin' (RELOAD and SHUTDOWN privileges):
-echo "update mysql.user set password=password('newpassword') where user='mysql_sysadmin'; FLUSH PRIVILEGES;" | mysql -u mysql -S $MYSQL_SOCKET
+echo "update mysql.user set password=password('newpassword') where user='mysql_sysadmin'; FLUSH PRIVILEGES;" | mysql -u root -S $MYSQL_SOCKET
For 'mysql' user (ALL privileges, DB admin):
-echo "update mysql.user set password=password('newpassword') where user='mysql'; FLUSH PRIVILEGES;" | mysql -u mysql -S $MYSQL_SOCKET
+echo "update mysql.user set password=password('newpassword') where user='mysql'; FLUSH PRIVILEGES;" | mysql -u root -S $MYSQL_SOCKET
NOTE: mysql_sysadmin password should be placed to $MYSQL_CONFIG in
-mysqladmin section. See the manual for more instructions.
+mariadb-admin section. See the manual for more instructions.
(This user is used at logs rotation and server shutdown)
END_OF_MSG
show "Filling help tables..."
ok=0
- ( echo "use mysql;"; cat /usr/share/mysql/fill_help_tables.sql ) | \
- /usr/sbin/mysqld --bootstrap --skip-grant-tables \
+ ( echo "use mysql;"; cat /usr/share/mariadb/fill_help_tables.sql ) | \
+ /usr/sbin/mariadbd --bootstrap --skip-grant-tables \
--datadir=$MYSQL_DATA_DIR --user=$MYSQL_USER \
--slave-load-tmpdir=$MYSQL_DATA_DIR --tmpdir=$MYSQL_DATA_DIR --log-error=$MYSQL_ERRLOG \
&& ok=1
@@ -454,12 +454,12 @@ END_OF_MSG
cat << END_OF_MSG
Installation of grant tables FAILED!
-The initialization SQL script was preserved at $MYSQL_DATA_DIR/mysql-init.sql
+The initialization SQL script was preserved at $MYSQL_DATA_DIR/mariadb-init.sql
-Examine the logs in /var/log/mysql for more information. You can
-also try to start the mysqld daemon with:
+Examine the logs in /var/log/mariadb for more information. You can
+also try to start the mariadbdb daemon with:
-/usr/sbin/mysqld --skip-grant &
+/usr/sbin/mariadbd --skip-grant &
You can use the command line tool mysql to connect to the mysql
database and look at the grant tables:
@@ -467,10 +467,10 @@ database and look at the grant tables:
shell> mysql -u mysql mysql
mysql> show tables
-Try 'mysqld --help' if you have problems with paths. Setting on
-logging in /etc/mysqld.conf gives you a log in /var/log/mysql/log that
+Try 'mariadbd --help' if you have problems with paths. Setting on
+logging in /etc/mysqld.conf gives you a log in /var/log/mariadb/log that
may be helpful. The latest information about MariaDB is available on the
-web at http://www.mysql.com/.
+web at https://www.mariadb.org/.
Please check PLD Linux ftp site for newer versions of this package.
@@ -589,9 +589,9 @@ case "$action" in
flush-logs)
for mysqldir in $DB_CLUSTERS; do
mysqlgetconfig "$mysqldir"
- # just if mysqld is really running
- if /usr/bin/mysqladmin --defaults-file="$MYSQL_CONFIG" --socket="$MYSQL_SOCKET" ping >/dev/null 2>&1; then
- /usr/bin/mysqladmin --defaults-file="$MYSQL_CONFIG" --socket="$MYSQL_SOCKET" flush-logs
+ # just if mariadbd is really running
+ if /usr/bin/mariadb-admin --defaults-file="$MYSQL_CONFIG" --socket="$MYSQL_SOCKET" ping >/dev/null 2>&1; then
+ /usr/bin/mariadb-admin --defaults-file="$MYSQL_CONFIG" --socket="$MYSQL_SOCKET" flush-logs
fi
done
;;
diff --git a/mariadb.sysconfig b/mariadb.sysconfig
index a314c78..8118390 100644
--- a/mariadb.sysconfig
+++ b/mariadb.sysconfig
@@ -1,26 +1,26 @@
-# Customized settings for mysql
+# Customized settings for mariadb
-# Define nice level for mysql
+# Define nice level for mariadb
SERVICE_RUN_NICE_LEVEL="+0"
# Be compatible with RA layout (not supported)
MYSQL_RA_COMPAT="no"
-# For clusters configuration look into /etc/mysql/clusters.conf
+# For clusters configuration look into /etc/mariadb/clusters.conf
# Don't use **obsolete** MYSQL_DB_CLUSTERS option
-# Seconds to wait for fully initialized mysqld to start. mysqld takes longer to
+# Seconds to wait for fully initialized mariadbd to start. mariadbd takes longer to
# start when it has to replay innodb logs, or create innodb pools at startup
#MYSQL_START_WAIT_TIME=15
-# Seconds to wait for mysqld to terminate on shutdown. If timeout is exceeded
+# Seconds to wait for mariadbd to terminate on shutdown. If timeout is exceeded
# shutdown is considered failed
#MYSQL_STOP_WAIT_TIME=900
-# Skip automatic mysqld restarts invoked from rpm installs.
+# Skip automatic mariadbd restarts invoked from rpm installs.
#RPM_SKIP_AUTO_RESTART=yes
-# Any option passed directly to mysqld on startup.
+# Any option passed directly to mariadbd on startup.
#MYSQL_OPTIONS="--open-files-limit=65535"
# fd limit increase
diff --git a/mysqld.conf b/mysqld.conf
index f3c03ec..d098614 100644
--- a/mysqld.conf
+++ b/mysqld.conf
@@ -11,185 +11,106 @@ socket = @clusterdir@/mysqldb/mysql.sock
port = 3306
user = mysql
-; ssl options
-;ssl-ca = /etc/ssl/certs/mysql/ca-cert.pem
-;ssl-cert = /etc/ssl/certs/mysql/server-cert.pem
-;ssl-key = /etc/ssl/certs/mysql/server-key.pem
-;ssl-cipher = DHE-RSA-AES256-SHA
-
-;character-set-server=latin2
-;collation-server=latin2_general_ci
-;skip-character-set-client-handshake
-
-; set default charset
-;default-character-set = latin1
-
-; Use passwords compatible with old 4.0 mysqld
-;old-passwords
-
-; Don't use system locking
-skip-locking
-
-; Don't listen on a TCP/IP port at all. This is a security enhancement,
-; if all processes that need to connect to mysqld run on the same host.
-; All interaction with mysqld must be made via Unix sockets.
-skip-networking
-
-; IP address to bind to
-;bind-address=127.0.0.1
-
-; no dns
-;skip-name-resolve
-
-; Emergency option. Use only if you really need this.
-;skip-grant-tables
-
-; skip startup of slave
-;skip-slave-start
-
-; slave setup
-;relay-log=slave-relay-bin
-;master-host=master
-;master-user=replica
-;master-port=3306
-;master-password=replica
-;report-host=db-slave.example.org
-
-; master does not ignore them, but we do
-;replicate-ignore-db=mysql
-;replicate-ignore-db=test
-
-;replicate-rewrite-db=delfi->delfi_ro
-
-; Replication Master Server (default)
-; binary logging is required for replication
-;log-bin=mysql-bin
-
-; Normally, a slave does not log to its own binary log any updates that are
-; received from a master server. This option tells the slave to log the updates
-; performed by its SQL thread to its own binary log. For this option to have
-; any effect, the slave must also be started with the --log-bin option to
-; enable binary logging. --log-slave-updates is used when you want to chain
-; replication servers.
-;log-slave-updates
-
-; required unique id between 1 and 2^32 - 1
-; defaults to 1 if master-host is not set but will not function as a master if omitted
-;server-id=2
-
-; databases to be included in binlog
-;binlog-do-db=db1
-; or excluded
-;binlog-ignore-db=mysql
-;binlog-ignore-db=test
-
-; mysqld error log (stderr)
-log-error = /var/log/mysql/mysqld.log
-log-warnings = 2
-
-; Log slow queries
-slow-query-log
-slow-query-log_file = /var/log/mysql/slow.log
-log-output = FILE
-
-; Log connections and queries. It slows down MySQL so it's disabled by default
-;general-log
-;general-log-file = /var/log/mysql/query.log
-
-; Log all updates.
-;log-update = /var/log/mysql/update
-; Log some extra information to update log
-;log-long-format
-
-; Language
-;language = polish
-
-; Path for temporary files. Several paths may be specified, separated by a
-; colon (:), in this case they are used in a round-robin fashion.
-;tmpdir = /var/tmp
-
-;
-; Internal server variables
-;
-
-;set-variable = back_log=5
-;set-variable = connect_timeout=5
-;set-variable = delayed_insert_timeout=300
-;set-variable = delayed_insert_limit=100
-;set-variable = flush_time=0
-;set-variable = join_buffer_size=131072
-;set-variable = key_buffer_size=8M
-;set-variable = read_rnd_buffer_size=256K
-;set-variable = read_buffer_size=132K
-;set-variable = long_query_time=10
-;set-variable = max_allowed_packet=1M
-;set-variable = max_connections=100
-;set-variable = max_user_connections=0
-;set-variable = max_connect_errors=10
-;set-variable = max_delayed_threads=20
-;set-variable = delayed_queue_size=1000
-;set-variable = max_join_size=4294967295
-;set-variable = max_sort_length=1024
-;set-variable = max_write_lock_count=4294967295
-;set-variable = net_buffer_length=16384
-;set-variable = record_buffer=131072
-;set-variable = sort_buffer_size=2M
-;set-variable = table_cache=64
-;set-variable = tmp_table_size=1M
-;set-variable = max_heap_table_size=32M
-;set-variable = thread_cache_size=16
-;set-variable = thread_stack=65536
-; Try number of CPU's*2
-;set-variable = thread_concurrency=8
-;set-variable = wait_timeout=28800
-;set-variable = query_cache_size=8M
-;set-variable = query_cache_limit=1M
-
-; replication local log
-;set-variable = max_relay_log_size=256M
-; max size of master binlog files
-;set-variable = max_binlog_size=256M
-
-; Fulltext search options
-;ft_min_word_len=2
-
-;
-; MyISAM tables options
-;
-
-; Don't flush key buffers between writes for any MyISAM
-; set this if you have dedicated slave server where writes aren't important
-;delay-key-write-for-all-tables
-
-; Repair automatically on open if the table wasn't closed properly.
-myisam-recover
-;
-;set-variable = myisam_sort_buffer_size=4M
-
-
-
-;
-; InnoDB tables options (see MySQL manual)
-;
-;skip-innodb
-
-; these are actual defaults (as of 5.0.26)
-innodb_data_home_dir = @clusterdir@/mysqldb/db
-innodb_data_file_path = ibdata1:10M:autoextend
-set-variable = innodb_mirrored_log_groups=1
-innodb_log_group_home_dir = @clusterdir@/mysqldb/db
-set-variable = innodb_log_files_in_group=2
-set-variable = innodb_log_file_size=5M
-set-variable = innodb_log_buffer_size=1M
-
-;innodb_flush_log_at_trx_commit=1
-;innodb_log_arch_dir = @clusterdir@/innodb/log
-;innodb_log_archive=0
-;set-variable = innodb_buffer_pool_size=80M
-;set-variable = innodb_additional_mem_pool_size=10M
-;set-variable = innodb_file_io_threads=4
-;set-variable = innodb_lock_wait_timeout=50
-
+# Broken reverse DNS slows down connections considerably and name resolve is
+# safe to skip if there are no "host by domain name" access grants
+#skip-name-resolve
+
+# Instead of skip-networking the default is now to listen only on
+# localhost which is more compatible and is not less secure.
+bind-address = 127.0.0.1
+
+#
+# * Fine Tuning
+#
+
+#key_buffer_size = 128M
+#max_allowed_packet = 1G
+#thread_stack = 192K
+#thread_cache_size = 8
+# This replaces the startup script and checks MyISAM tables if needed
+# the first time they are touched
+#myisam_recover_options = BACKUP
+#max_connections = 100
+#table_cache = 64
+
+#
+# * Logging and Replication
+#
+
+# Note: The configured log file or its directory need to be created
+# and be writable by the mysql user, e.g.:
+# $ sudo mkdir -m 2750 /var/log/mysql
+# $ sudo chown mysql /var/log/mysql
+
+# Both location gets rotated by the cronjob.
+# Be aware that this log type is a performance killer.
+# Recommend only changing this at runtime for short testing periods if needed!
+#general_log_file = /var/log/mysql/mysql.log
+#general_log = 1
+
+# When running under systemd, error logging goes via stdout/stderr to journald
+# and when running legacy init error logging goes to syslog due to
+# /etc/mysql/conf.d/mariadb.conf.d/50-mysqld_safe.cnf
+# Enable this if you want to have error logging into a separate file
+#log_error = /var/log/mysql/error.log
+# Enable the slow query log to see queries with especially long duration
+#slow_query_log_file = /var/log/mysql/mariadb-slow.log
+#long_query_time = 10
+#log_slow_verbosity = query_plan,explain
+#log-queries-not-using-indexes
+#min_examined_row_limit = 1000
+
+# The following can be used as easy to replay backup logs or for replication.
+# note: if you are setting up a replication slave, see README.Debian about
+# other settings you may need to change.
+#server-id = 1
+#log_bin = /var/log/mysql/mysql-bin.log
+expire_logs_days = 10
+#max_binlog_size = 100M
+
+#
+# * SSL/TLS
+#
+
+# For documentation, please read
+# https://mariadb.com/kb/en/securing-connections-for-client-and-server/
+#ssl-ca = /etc/mysql/cacert.pem
+#ssl-cert = /etc/mysql/server-cert.pem
+#ssl-key = /etc/mysql/server-key.pem
+#require-secure-transport = on
+
+#
+# * Character sets
+#
+
+# MySQL/MariaDB default is Latin1, but in Debian we rather default to the full
+# utf8 4-byte character set. See also client.cnf
+character-set-server = utf8mb4
+collation-server = utf8mb4_general_ci
+
+
+#
+# * InnoDB
+#
+
+# InnoDB is enabled by default with a 10MB datafile in /var/lib/mysql/.
+# Read the manual for more InnoDB related options. There are many!
+# Most important is to give InnoDB 80 % of the system RAM for buffer use:
+# https://mariadb.com/kb/en/innodb-system-variables/#innodb_buffer_pool_size
+#innodb_buffer_pool_size = 8G
+
+# this is only for embedded server
+[embedded]
+
+# This group is only read by MariaDB servers, not by MySQL.
+# If you use the same .cnf file for MySQL and MariaDB,
+# you can put MariaDB-only options here
+[mariadb]
+
+# This group is only read by MariaDB-10.11 servers.
+# If you use the same .cnf file for MariaDB of different versions,
+# use this group for options that older servers don't understand
+[mariadb-10.11]
; used for logs rotation
[mysqladmin]
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/mariadb.git/commitdiff/4fb1a4b107442acd747cf5a9b8da87963fb85000
More information about the pld-cvs-commit
mailing list