Skip to content
Snippets Groups Projects
Commit a6c0a21a authored by Otto Kekäläinen's avatar Otto Kekäläinen
Browse files

Follow to new /etc/mysql/my.cnf management scheme

parent 8c267579
Branches
Tags
No related merge requests found
# 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/
[client]
# Default is Latin1, if you need UTF-8 set this (also in server section)
default-character-set = utf8
[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
[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
[mysqld_safe]
syslog
mariadb-10.0 (10.0.16-1~exp4) experimental; urgency=low
* Follow to new /etc/mysql/my.cnf management scheme
-- Otto Kekäläinen <otto@seravo.fi> Tue, 03 Feb 2015 23:11:20 +0200
mariadb-10.0 (10.0.16-1~exp3) experimental; urgency=low
* Update the mail.ssl test to match new cacert.pem
......
debian/additions/mariadb.cnf etc/mysql/conf.d
debian/additions/mariadb.cnf etc/mysql/
debian/additions/mariadb.conf.d etc/mysql/
#!/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
......@@ -2,9 +2,25 @@
set -e
if [ "$1" = "purge" ]; then
rmdir /etc/mysql/conf.d 2>/dev/null || true
rmdir /etc/mysql 2>/dev/null || true
fi
case "$1" in
remove|disappear)
# New packaging paradigm for my.cnf as of Dec-2014 for sharing mysql
# variants in Ubuntu.
if [ -f /usr/share/mysql-common/configure-symlinks ]
then
/usr/share/mysql-common/configure-symlinks remove mariadb "/etc/mysql/mariadb.cnf"
fi
;;
purge|upgrade|failed-upgrade|abort-install|abort-upgrade)
;;
*)
echo "postrm called with unknown argument '$1'" 1>&2
exit 1
;;
esac
#DEBHELPER#
exit 0
etc/mysql/conf.d/connect.cnf
etc/mysql/conf.d/connect.cnf etc/mysql/mariadb.conf.d/connect.cnf
usr/lib/mysql/plugin/ha_connect.so
debian/additions/debian-start etc/mysql
debian/additions/debian-start.inc.sh usr/share/mysql
debian/additions/echo_stderr usr/share/mysql
debian/additions/mysqld_safe_syslog.cnf etc/mysql/conf.d
etc/apparmor.d/usr.sbin.mysqld
usr/bin/aria_chk
usr/bin/aria_dump_log
......
......@@ -37,7 +37,9 @@ def add_info(report):
report[key] += line + '\n'
attach_mac_events(report, '/usr/sbin/mysqld')
attach_file(report,'/etc/apparmor.d/usr.sbin.mysqld')
_add_my_conf_files(report, '/etc/mysql/my.cnf')
_add_my_conf_files(report, '/etc/mysql/mariadb.cnf')
_add_my_conf_files(report, '/etc/mysql/mariadb.conf.d/mysqld.cnf')
_add_my_conf_files(report, '/etc/mysql/mariadb.conf.d/client.cnf')
for f in os.listdir('/etc/mysql/conf.d'):
_add_my_conf_files(report, os.path.join('/etc/mysql/conf.d', f))
try:
......
......@@ -87,7 +87,7 @@ override_dh_prep:
override_dh_auto_configure:
@echo "RULES.$@"
dh_testdir
( test -d $(BUILDDIR) || mkdir $(BUILDDIR) ) && cd $(BUILDDIR) && \
sh -c 'PATH=$${MYSQL_BUILD_PATH:-"/usr/local/bin:/usr/bin:/bin"} \
CC=$${MYSQL_BUILD_CC:-gcc} \
......@@ -123,21 +123,21 @@ override_dh_auto_install:
@echo "RULES.$@"
dh_testdir
dh_testroot
# If TokuDB plugin was built add it to the server install list.
[ ! -f $(BUILDDIR)/storage/tokudb/ha_tokudb.so ] || echo 'usr/lib/mysql/plugin/ha_tokudb.so\netc/mysql/conf.d/tokudb.cnf\nusr/bin/tokuftdump\nusr/share/doc/mariadb-server-10.0/README-TOKUDB\nusr/share/doc/mariadb-server-10.0/README.md' >> debian/mariadb-server-10.0.install
[ ! -f $(BUILDDIR)/storage/tokudb/ha_tokudb.so ] || echo 'usr/lib/mysql/plugin/ha_tokudb.so\netc/mysql/mariadb.conf.d/tokudb.cnf\nusr/bin/tokuftdump\nusr/share/doc/mariadb-server-10.0/README-TOKUDB\nusr/share/doc/mariadb-server-10.0/README.md' >> debian/mariadb-server-10.0.install
# If Mroonga plugin was built add it to the server install list.
[ ! -f $(BUILDDIR)/storage/mroonga/ha_mroonga.so ] || echo 'usr/lib/mysql/plugin/ha_mroonga.so' >> debian/mariadb-server-10.0.install
# If libthrift-dev was available (manually installed, as it is
# not in Debian) and ha_cassandra.so was thus built add it to
# the server install list.
[ ! -f $(BUILDDIR)/storage/cassandra/ha_cassandra.so ] || echo 'usr/lib/mysql/plugin/ha_cassandra.so' >> debian/mariadb-server-10.0.install
# make install
cd $(BUILDDIR) && $(MAKE) install DESTDIR=$(TMP)
# mariadb-server
# INBO_BIN is generated at build time and must thus be installed like this
install -D -m 0644 $(BUILDDIR)/Docs/INFO_BIN $(TMP)/usr/share/doc/mariadb-server-10.0/INFO_BIN
......@@ -146,16 +146,16 @@ override_dh_auto_install:
$(TMP)/usr/share/mysql/mysql.server \
$(TMP)/usr/share/mysql/binary-configure
nm -n $(BUILDDIR)/sql/mysqld |gzip -n -9 > $(TMP)/usr/share/doc/mariadb-server-10.0/mysqld.sym.gz
# rename and install AppArmor profile
install -D -m 644 debian/apparmor-profile $(TMP)/etc/apparmor.d/usr.sbin.mysqld
# rename and install Apport hook
install -D -m 644 debian/mariadb-server-10.0.py $(TMP)/usr/share/apport/package-hooks/source_mariadb-10.0.py
# mariadb-test
mv $(TMP)/usr/mysql-test $(TMP)/usr/share/mysql
touch $@
override_dh_installlogrotate-arch:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment