This repository has been archived by the owner on Apr 13, 2023. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Follow to new /etc/mysql/my.cnf management scheme
See mysql-common package changes at basak/debian-mysql@6c0a50a
- Loading branch information
Showing
8 changed files
with
178 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,15 @@ | ||
# MariaDB-specific config file. | ||
# Read by /etc/mysql/my.cnf | ||
|
||
[client] | ||
# Default is Latin1, if you need UTF-8 set this (also in server section) | ||
#default-character-set = utf8 | ||
|
||
[mysqld] | ||
# The MariaDB configuration file | ||
# | ||
# * Character sets | ||
# | ||
# Default is Latin1, if you need UTF-8 set all this (also in client section) | ||
# The MariaDB/MySQL tools read configuration files in the following order: | ||
# - "/etc/mysql/mariadb.cnf" (this file) to set global defaults, | ||
# - "/etc/mysql/mariadb.conf.d/*.cnf" to set global options. | ||
# - "~/.my.cnf" to set user-specific options. | ||
# | ||
#character-set-server = utf8 | ||
#collation-server = utf8_general_ci | ||
#character_set_server = utf8 | ||
#collation_server = utf8_general_ci | ||
|
||
# Needed so the root database user can authenticate without a password but | ||
# only when running as the unix root user. | ||
# If the same option is defined multiple times, the last one will apply. | ||
# | ||
# Also available for other users if required. | ||
# See https://mariadb.com/kb/en/unix_socket-authentication-plugin/ | ||
plugin-load-add = auth_socket.so | ||
# One can use all long options that the program supports. | ||
# Run program with --help to get a list of available options and with | ||
# --print-defaults to see which it would actually understand and use. | ||
|
||
# Import all .cnf files from configuration directory | ||
!includedir /etc/mysql/mariadb.conf.d/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[client] | ||
# Default is Latin1, if you need UTF-8 set this (also in server section) | ||
default-character-set = utf8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,103 @@ | ||
[mysqld] | ||
# | ||
# * Basic Settings | ||
# | ||
user = mysql | ||
pid-file = /var/run/mysqld/mysqld.pid | ||
socket = /var/run/mysqld/mysqld.sock | ||
port = 3306 | ||
basedir = /usr | ||
datadir = /var/lib/mysql | ||
tmpdir = /tmp | ||
lc-messages-dir = /usr/share/mysql | ||
skip-external-locking | ||
|
||
# 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 = 16M | ||
max_allowed_packet = 16M | ||
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 = BACKUP | ||
#max_connections = 100 | ||
#table_cache = 64 | ||
#thread_concurrency = 10 | ||
|
||
# | ||
# * Query Cache Configuration | ||
# | ||
query_cache_limit = 1M | ||
query_cache_size = 16M | ||
|
||
# | ||
# * Logging and Replication | ||
# | ||
# Both location gets rotated by the cronjob. | ||
# Be aware that this log type is a performance killer. | ||
# As of 5.1 you can enable the log at runtime! | ||
#general_log_file = /var/log/mysql/mysql.log | ||
#general_log = 1 | ||
# | ||
# Error log - should be very few entries. | ||
# | ||
log_error = /var/log/mysql/error.log | ||
# | ||
# Here you can see queries with especially long duration | ||
#log_slow_queries = /var/log/mysql/mysql-slow.log | ||
#long_query_time = 2 | ||
#log-queries-not-using-indexes | ||
# | ||
# 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 | ||
#binlog_do_db = include_database_name | ||
#binlog_ignore_db = include_database_name | ||
|
||
# | ||
# * 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! | ||
|
||
# | ||
# * Security Features | ||
# | ||
# Read the manual, too, if you want chroot! | ||
# chroot = /var/lib/mysql/ | ||
# | ||
# For generating SSL certificates I recommend the OpenSSL GUI "tinyca". | ||
# | ||
# ssl-ca=/etc/mysql/cacert.pem | ||
# ssl-cert=/etc/mysql/server-cert.pem | ||
# ssl-key=/etc/mysql/server-key.pem | ||
|
||
# | ||
# * Character sets | ||
# | ||
# Default is Latin1, if you need UTF-8 set all this (also in client section) | ||
# | ||
character-set-server = utf8 | ||
collation-server = utf8_general_ci | ||
character_set_server = utf8 | ||
collation_server = utf8_general_ci | ||
|
||
# | ||
# * Unix socket authentication plugin | ||
# | ||
# Needed so the root database user can authenticate without a password but | ||
# only when running as the unix root user. | ||
# | ||
# Also available for other users if required. | ||
# See https://mariadb.com/kb/en/unix_socket-authentication-plugin/ | ||
plugin-load-add = auth_socket.so |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
[mysqld_safe] | ||
# This will be passed to all mysql clients | ||
# It has been reported that passwords should be enclosed with ticks/quotes | ||
# escpecially if they contain "#" chars... | ||
# Remember to edit /etc/mysql/debian.cnf when changing the socket location. | ||
socket = /var/run/mysqld/mysqld.sock | ||
nice = 0 | ||
syslog |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
debian/additions/mariadb.cnf etc/mysql/conf.d | ||
debian/additions/mariadb.cnf etc/mysql/ | ||
debian/additions/mariadb.conf.d etc/mysql/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
case "$1" in | ||
configure) | ||
# New packaging paradigm for my.cnf as of Dec-2014 for sharing mysql | ||
# variants in Ubuntu. If the new mysql-common package does not provide | ||
# the update-alternatives facility, fall back to creating a symlink | ||
if [ -f /usr/share/mysql-common/configure-symlinks ] | ||
then | ||
/usr/share/mysql-common/configure-symlinks install mariadb "/etc/mysql/mariadb.cnf" | ||
else | ||
mv /etc/mysql/my.cnf /etc/mysql/my.cnf.old | ||
ln -s /etc/mysql/mariadb.cnf /etc/mysql/my.cnf | ||
fi | ||
;; | ||
|
||
abort-upgrade|abort-remove|abort-configure) | ||
;; | ||
|
||
*) | ||
echo "postinst called with unknown argument '$1'" 1>&2 | ||
exit 1 | ||
;; | ||
esac | ||
|
||
#DEBHELPER# | ||
|
||
exit 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters