mirror of
https://github.com/HanXHX/ansible-mysql.git
synced 2026-04-09 13:42:10 +07:00
Use modern configuration
- Debian buster configuration style - Drop logrotate management (useless) - Add new default values in defaults/main.yml (according with MariaDB doc) - Travis with Ansible 2.8+
This commit is contained in:
@@ -7,21 +7,17 @@ mariadb_origin: 'default'
|
||||
mariadb_use_galera: false
|
||||
mariadb_notify_restart: true
|
||||
mariadb_upstream_apt_src: false
|
||||
mariadb_manage_logrotate: true
|
||||
|
||||
# -------------------------------------
|
||||
# Configuration
|
||||
# -------------------------------------
|
||||
|
||||
# MariaDB configuration template
|
||||
mariadb_config_template: 'etc/mysql/my.cnf.j2'
|
||||
|
||||
# MariaDB connection settings.
|
||||
mariadb_port: "3306"
|
||||
mariadb_bind_address: '127.0.0.1'
|
||||
mariadb_datadir: '/var/lib/mysql'
|
||||
mariadb_pid_file: '/var/run/mysqld/mysqld.pid'
|
||||
mariadb_socket: '/var/run/mysqld/mysqld.sock'
|
||||
mariadb_pid_file: '/run/mysqld/mysqld.pid'
|
||||
mariadb_socket: '/run/mysqld/mysqld.sock'
|
||||
|
||||
# Slow query log settings.
|
||||
mariadb_slow_query_log_enabled: false
|
||||
@@ -29,37 +25,38 @@ mariadb_slow_query_log_file: '/var/log/mysql/mysql_slow.log'
|
||||
mariadb_slow_query_time: 2
|
||||
|
||||
# Memory settings (default values optimized ~512MB RAM).
|
||||
# Fine Tuning
|
||||
mariadb_key_buffer_size: '256M'
|
||||
mariadb_max_allowed_packet: '64M'
|
||||
mariadb_table_open_cache: '256'
|
||||
mariadb_sort_buffer_size: '1M'
|
||||
mariadb_max_connections: 100
|
||||
mariadb_thread_concurrency: "{{ ansible_processor_cores * 2 }}"
|
||||
|
||||
|
||||
mariadb_table_open_cache: '2000'
|
||||
mariadb_sort_buffer_size: '2M'
|
||||
mariadb_read_buffer_size: '1M'
|
||||
mariadb_read_rnd_buffer_size: '4M'
|
||||
mariadb_myisam_sort_buffer_size: '64M'
|
||||
mariadb_thread_cache_size: '8'
|
||||
mariadb_read_rnd_buffer_size: '2M'
|
||||
mariadb_myisam_sort_buffer_size: '128M'
|
||||
mariadb_thread_cache_size: '256'
|
||||
mariadb_query_cache_size: '16M'
|
||||
|
||||
# Other settings.
|
||||
mariadb_wait_timeout: 28800
|
||||
|
||||
# Try number of CPU's * 2 for thread_concurrency.
|
||||
mariadb_thread_concurrency: "{{ ansible_processor_cores * 2 }}"
|
||||
|
||||
# InnoDB settings.
|
||||
mariadb_innodb_file_per_table: '1'
|
||||
mariadb_innodb_buffer_pool_size: "{{ (ansible_memtotal_mb * 0.2) | round | int }}M"
|
||||
mariadb_innodb_log_file_size: "64M" # If this setting changes on a running system, you will break it! http://dev.mysql.com/doc/refman/5.6/en/innodb-data-log-reconfiguration.html
|
||||
mariadb_innodb_log_buffer_size: '8M'
|
||||
mariadb_innodb_flush_log_at_trx_commit: '1'
|
||||
mariadb_innodb_lock_wait_timeout: 50
|
||||
|
||||
# mysqldump settings.
|
||||
mariadb_mysqldump_max_allowed_packet: '64M'
|
||||
|
||||
# Logging settings.
|
||||
mariadb_log_error: '/var/log/mysql/mysql_error.log'
|
||||
mariadb_syslog_tag: 'mysql'
|
||||
|
||||
# mysqldump settings.
|
||||
mariadb_mysqldump_max_allowed_packet: '64M'
|
||||
|
||||
# -------------------------------------
|
||||
# Extra configuration
|
||||
# -------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user