2015-07-12 15:42:46 +07:00
|
|
|
---
|
|
|
|
|
|
|
|
# -------------------------------------
|
|
|
|
# Setup
|
|
|
|
# -------------------------------------
|
2015-07-16 15:56:28 +07:00
|
|
|
mysql_origin: 'upstream'
|
2015-07-13 17:32:49 +07:00
|
|
|
mysql_vendor: 'mariadb'
|
2015-07-12 15:42:46 +07:00
|
|
|
mysql_root_password: 'change_me_NOW'
|
|
|
|
|
|
|
|
# -------------------------------------
|
|
|
|
# Configuration
|
|
|
|
# -------------------------------------
|
2015-08-11 04:45:01 +07:00
|
|
|
|
|
|
|
# MySQL connection settings.
|
|
|
|
mysql_port: "3306"
|
|
|
|
mysql_bind_address: '127.0.0.1'
|
|
|
|
mysql_datadir: '/var/lib/mysql'
|
|
|
|
mysql_pid_file: '/var/run/mysqld/mysqld.pid'
|
|
|
|
mysql_socket: '/var/run/mysqld/mysqld.sock'
|
|
|
|
|
|
|
|
# Slow query log settings.
|
|
|
|
mysql_slow_query_log_enabled: false
|
|
|
|
mysql_slow_query_log_file: '/var/log/mysql-slow.log'
|
|
|
|
mysql_slow_query_time: 2
|
|
|
|
|
|
|
|
# Memory settings (default values optimized ~512MB RAM).
|
|
|
|
mysql_key_buffer_size: '256M'
|
|
|
|
mysql_max_allowed_packet: '64M'
|
|
|
|
mysql_table_open_cache: '256'
|
|
|
|
mysql_sort_buffer_size: '1M'
|
|
|
|
mysql_read_buffer_size: '1M'
|
|
|
|
mysql_read_rnd_buffer_size: '4M'
|
|
|
|
mysql_myisam_sort_buffer_size: '64M'
|
|
|
|
mysql_thread_cache_size: '8'
|
|
|
|
mysql_query_cache_size: '16M'
|
|
|
|
|
|
|
|
# Other settings.
|
|
|
|
mysql_wait_timeout: 28800
|
|
|
|
|
|
|
|
# Try number of CPU's * 2 for thread_concurrency.
|
|
|
|
mysql_thread_concurrency: 2
|
|
|
|
|
|
|
|
# InnoDB settings.
|
|
|
|
mysql_innodb_file_per_table: '1'
|
|
|
|
mysql_innodb_buffer_pool_size: "{{ (ansible_memtotal_mb * 0.6) | round | int }}M"
|
|
|
|
mysql_innodb_additional_mem_pool_size: '20M'
|
|
|
|
mysql_innodb_log_file_size: '64M'
|
|
|
|
mysql_innodb_log_buffer_size: '8M'
|
|
|
|
mysql_innodb_flush_log_at_trx_commit: '1'
|
|
|
|
mysql_innodb_lock_wait_timeout: 50
|
|
|
|
|
|
|
|
# mysqldump settings.
|
|
|
|
mysql_mysqldump_max_allowed_packet: '64M'
|
|
|
|
|
|
|
|
# Logging settings.
|
|
|
|
mysql_log: ''
|
|
|
|
mysql_log_error: '/var/log/mysql.err'
|
|
|
|
mysql_syslog_tag: 'mysql'
|
|
|
|
|
|
|
|
# -------------------------------------
|
|
|
|
# Extra configuration
|
|
|
|
# -------------------------------------
|
|
|
|
#
|
|
|
|
mysql_extra_configuration: []
|
|
|
|
|
|
|
|
# Example:
|
|
|
|
#mysql_extra_configuration:
|
|
|
|
# - group_name: 'mysqld'
|
|
|
|
# conf:
|
|
|
|
# - key: 'innodb_awsome_feature'
|
|
|
|
# value: 1
|
2015-07-12 15:42:46 +07:00
|
|
|
|
|
|
|
# -------------------------------------
|
|
|
|
# Database / Users
|
|
|
|
# -------------------------------------
|
|
|
|
mysql_databases: []
|
|
|
|
mysql_users: []
|
|
|
|
|
|
|
|
# -------------------------------------
|
|
|
|
# MariaDB
|
|
|
|
# -------------------------------------
|
2015-07-12 16:50:23 +07:00
|
|
|
mariadb_version: '10.0' # (5.5, 10.0)
|
2015-07-12 15:42:46 +07:00
|
|
|
# See: http://mariadb.org/mariadb/repositories/
|
2015-07-13 17:32:49 +07:00
|
|
|
mariadb_repository: "http://ftp.igh.cnrs.fr/pub/mariadb/repo/{{ mariadb_version }}/debian"
|
2015-07-12 15:42:46 +07:00
|
|
|
|
|
|
|
# -------------------------------------
|
|
|
|
# Percona
|
|
|
|
# -------------------------------------
|
|
|
|
percona_version: '5.6'
|
|
|
|
percona_repository: 'http://repo.percona.com/apt'
|