From 02c8f3342ec9de4a822e68f3f494f7c108bff574 Mon Sep 17 00:00:00 2001 From: mh Date: Sat, 10 Jan 2015 02:18:15 +0100 Subject: introduce new mariadb based config for EL7 --- files/config/my.cnf.CentOS | 45 ++++++----------------- files/config/my.cnf.CentOS.5 | 87 ++++++++++++++++++++++++++++++++++++++++++++ files/config/my.cnf.CentOS.6 | 87 ++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 186 insertions(+), 33 deletions(-) create mode 100644 files/config/my.cnf.CentOS.5 create mode 100644 files/config/my.cnf.CentOS.6 diff --git a/files/config/my.cnf.CentOS b/files/config/my.cnf.CentOS index 1abf15c..c15d2b8 100644 --- a/files/config/my.cnf.CentOS +++ b/files/config/my.cnf.CentOS @@ -3,19 +3,16 @@ datadir=/var/lib/mysql/data log-bin=/var/lib/mysql/mysql-bin expire_logs_days=5 socket=/var/lib/mysql/mysql.sock -# Default to using old password format for compatibility with mysql 3.x -# clients (those using the mysqlclient10 compatibility package). -old_passwords=0 - -character-set-server = utf8 -skip-name-resolve +# Disabling symbolic-links is recommended to prevent assorted security risks +symbolic-links=0 +# Settings user and group are ignored when systemd is used. +# If you need to run mysqld under a different user or group, +# customize your systemd unit file for mariadb according to the +# instructions in http://fedoraproject.org/wiki/Systemd bind-address=127.0.0.1 max_allowed_packet = 10M -# Disabling symbolic-links is recommended to prevent assorted security risks -symbolic-links=0 - # Query cache is used to cache SELECT results and later return them # without actual executing the same query once again. Having the query # cache enabled may result in significant speed improvements, if your @@ -59,29 +56,11 @@ innodb_file_per_table query_cache_limit=5M -[mysql] -no-auto-rehash -# Remove the next comment character if you are not familiar with SQL -#safe-updates -default-character-set=utf8 - -[mysqlimport] -default-character-set=utf8 - -[mysqlshow] -default-character-set=utf8 - -[mysql.server] -user=mysql -basedir=/usr - [mysqld_safe] -log-error=/var/log/mysqld.log -pid-file=/var/run/mysqld/mysqld.pid - -[mysqldump] -quick -max_allowed_packet = 16M -default-character-set=utf8 +log-error=/var/log/mariadb/mariadb.log +pid-file=/var/run/mariadb/mariadb.pid -!includedir /etc/mysql/conf.d/ +# +# include all files from the config directory +# +!includedir /etc/my.cnf.d diff --git a/files/config/my.cnf.CentOS.5 b/files/config/my.cnf.CentOS.5 new file mode 100644 index 0000000..1abf15c --- /dev/null +++ b/files/config/my.cnf.CentOS.5 @@ -0,0 +1,87 @@ +[mysqld] +datadir=/var/lib/mysql/data +log-bin=/var/lib/mysql/mysql-bin +expire_logs_days=5 +socket=/var/lib/mysql/mysql.sock +# Default to using old password format for compatibility with mysql 3.x +# clients (those using the mysqlclient10 compatibility package). +old_passwords=0 + +character-set-server = utf8 +skip-name-resolve + +bind-address=127.0.0.1 +max_allowed_packet = 10M + +# Disabling symbolic-links is recommended to prevent assorted security risks +symbolic-links=0 + +# Query cache is used to cache SELECT results and later return them +# without actual executing the same query once again. Having the query +# cache enabled may result in significant speed improvements, if your +# have a lot of identical queries and rarely changing tables. See the +# "Qcache_lowmem_prunes" status variable to check if the current value +# is high enough for your load. +# Note: In case your tables change very often or if your queries are +# textually different every time, the query cache may result in a +# slowdown instead of a performance improvement. +query_cache_size = 64M + +# Log slow queries. Slow queries are queries which take more than the +# amount of time defined in "long_query_time" or which do not use +# indexes well, if log_long_format is enabled. It is normally good idea +# to have this turned on if you frequently add new queries to the +# system. +slow_query_log + +# How many threads we should keep in a cache for reuse. When a client +# disconnects, the client's threads are put in the cache if there aren't +# more than thread_cache_size threads from before. This greatly reduces +# the amount of thread creations needed if you have a lot of new +# connections. (Normally this doesn't give a notable performance +# improvement if you have a good thread implementation.) +thread_cache_size = 4 + +# InnoDB, unlike MyISAM, uses a buffer pool to cache both indexes and +# row data. The bigger you set this the less disk I/O is needed to +# access data in tables. On a dedicated database server you may set this +# parameter up to 80% of the machine physical memory size. Do not set it +# too large, though, because competition of the physical memory may +# cause paging in the operating system. Note that on 32bit systems you +# might be limited to 2-3.5G of user level memory per process, so do not +# set it too high. +innodb_data_home_dir = /var/lib/mysql/data +innodb_data_file_path = ibdata1:10M:autoextend +innodb_log_group_home_dir = /var/lib/mysql/ +innodb_buffer_pool_size = 50MB + +innodb_file_per_table + +query_cache_limit=5M + +[mysql] +no-auto-rehash +# Remove the next comment character if you are not familiar with SQL +#safe-updates +default-character-set=utf8 + +[mysqlimport] +default-character-set=utf8 + +[mysqlshow] +default-character-set=utf8 + +[mysql.server] +user=mysql +basedir=/usr + +[mysqld_safe] +log-error=/var/log/mysqld.log +pid-file=/var/run/mysqld/mysqld.pid + +[mysqldump] +quick +max_allowed_packet = 16M +default-character-set=utf8 + +!includedir /etc/mysql/conf.d/ diff --git a/files/config/my.cnf.CentOS.6 b/files/config/my.cnf.CentOS.6 new file mode 100644 index 0000000..1abf15c --- /dev/null +++ b/files/config/my.cnf.CentOS.6 @@ -0,0 +1,87 @@ +[mysqld] +datadir=/var/lib/mysql/data +log-bin=/var/lib/mysql/mysql-bin +expire_logs_days=5 +socket=/var/lib/mysql/mysql.sock +# Default to using old password format for compatibility with mysql 3.x +# clients (those using the mysqlclient10 compatibility package). +old_passwords=0 + +character-set-server = utf8 +skip-name-resolve + +bind-address=127.0.0.1 +max_allowed_packet = 10M + +# Disabling symbolic-links is recommended to prevent assorted security risks +symbolic-links=0 + +# Query cache is used to cache SELECT results and later return them +# without actual executing the same query once again. Having the query +# cache enabled may result in significant speed improvements, if your +# have a lot of identical queries and rarely changing tables. See the +# "Qcache_lowmem_prunes" status variable to check if the current value +# is high enough for your load. +# Note: In case your tables change very often or if your queries are +# textually different every time, the query cache may result in a +# slowdown instead of a performance improvement. +query_cache_size = 64M + +# Log slow queries. Slow queries are queries which take more than the +# amount of time defined in "long_query_time" or which do not use +# indexes well, if log_long_format is enabled. It is normally good idea +# to have this turned on if you frequently add new queries to the +# system. +slow_query_log + +# How many threads we should keep in a cache for reuse. When a client +# disconnects, the client's threads are put in the cache if there aren't +# more than thread_cache_size threads from before. This greatly reduces +# the amount of thread creations needed if you have a lot of new +# connections. (Normally this doesn't give a notable performance +# improvement if you have a good thread implementation.) +thread_cache_size = 4 + +# InnoDB, unlike MyISAM, uses a buffer pool to cache both indexes and +# row data. The bigger you set this the less disk I/O is needed to +# access data in tables. On a dedicated database server you may set this +# parameter up to 80% of the machine physical memory size. Do not set it +# too large, though, because competition of the physical memory may +# cause paging in the operating system. Note that on 32bit systems you +# might be limited to 2-3.5G of user level memory per process, so do not +# set it too high. +innodb_data_home_dir = /var/lib/mysql/data +innodb_data_file_path = ibdata1:10M:autoextend +innodb_log_group_home_dir = /var/lib/mysql/ +innodb_buffer_pool_size = 50MB + +innodb_file_per_table + +query_cache_limit=5M + +[mysql] +no-auto-rehash +# Remove the next comment character if you are not familiar with SQL +#safe-updates +default-character-set=utf8 + +[mysqlimport] +default-character-set=utf8 + +[mysqlshow] +default-character-set=utf8 + +[mysql.server] +user=mysql +basedir=/usr + +[mysqld_safe] +log-error=/var/log/mysqld.log +pid-file=/var/run/mysqld/mysqld.pid + +[mysqldump] +quick +max_allowed_packet = 16M +default-character-set=utf8 + +!includedir /etc/mysql/conf.d/ -- cgit v1.2.3