|
| 1 | +# Simple MariaDB database server configuration file. |
| 2 | +# |
| 3 | +# ================================================================= |
| 4 | +# Base configuration courtesy of Open Query (http://openquery.com/) |
| 5 | +# For production use, case-specific preparation is still required. |
| 6 | +# 2009-10-07 |
| 7 | +# |
| 8 | +# This is *not* an optimised config, merely a more sane baseline: |
| 9 | +# - binary and slow log enabled, with enhancements |
| 10 | +# - InnoDB default (e.g., ACID out-of-the-box, same as on Windows) |
| 11 | +# - strict mode (for proper input checks, same as on Windows) |
| 12 | +# - various other useful settings |
| 13 | +# - make use of MariaDB/Percona/OurDelta enhancements/extensions |
| 14 | +# |
| 15 | +# For tuning assistance, please see http://openquery.com/services |
| 16 | +# ================================================================= |
| 17 | + |
| 18 | +[client] |
| 19 | +default-character-set = utf8 |
| 20 | + |
| 21 | +# Here is entries for some specific programs |
| 22 | +# The following values assume you have at least 32M ram |
| 23 | + |
| 24 | +# This was formally known as [safe_mysqld]. Both versions are currently parsed. |
| 25 | +[mysqld_safe] |
| 26 | +nice = 0 |
| 27 | +log-error=/var/log/mysql/mysqld.log |
| 28 | + |
| 29 | +[server] |
| 30 | +# |
| 31 | +# * Basic Settings |
| 32 | +# |
| 33 | +user = mysql |
| 34 | +tmpdir = /tmp |
| 35 | +skip-external-locking |
| 36 | + |
| 37 | +# |
| 38 | +# * Fine Tuning |
| 39 | +# |
| 40 | +max_connections = 32 |
| 41 | +connect_timeout = 5 |
| 42 | +wait_timeout = 600 |
| 43 | +max_allowed_packet = 16M |
| 44 | +thread_cache_size = 128 |
| 45 | +sort_buffer_size = 4M |
| 46 | +bulk_insert_buffer_size = 16M |
| 47 | +tmp_table_size = 32M |
| 48 | +max_heap_table_size = 32M |
| 49 | +# |
| 50 | +# * MyISAM |
| 51 | +# |
| 52 | +# This replaces the startup script and checks MyISAM tables if needed |
| 53 | +# the first time they are touched. On error, make copy and try a repair. |
| 54 | +myisam_recover = BACKUP |
| 55 | +key_buffer_size = 128M |
| 56 | +#open-files-limit = 2000 |
| 57 | +table_cache = 400 |
| 58 | +myisam_sort_buffer_size = 512M |
| 59 | +concurrent_insert = 2 |
| 60 | +read_buffer_size = 2M |
| 61 | +read_rnd_buffer_size = 1M |
| 62 | +# |
| 63 | +# * Query Cache Configuration |
| 64 | +# |
| 65 | +# Cache only tiny result sets, so we can fit more in the query cache. |
| 66 | +query_cache_limit = 128K |
| 67 | +query_cache_size = 64M |
| 68 | +# for more write intensive setups, set to DEMAND or OFF |
| 69 | +#query_cache_type = DEMAND |
| 70 | +# |
| 71 | +# * Logging and Replication |
| 72 | +# |
| 73 | +# Both location gets rotated by the cronjob. |
| 74 | +# Be aware that this log type is a performance killer. |
| 75 | +# As of 5.1 you can enable the log at runtime! |
| 76 | +#general_log_file = /var/log/mysql/mysql.log |
| 77 | +#general_log = 1 |
| 78 | +# |
| 79 | +# Error logging goes to syslog due to /etc/mysql/conf.d/mysqld_safe_syslog.cnf. |
| 80 | +# |
| 81 | +# we do want to know about network errors and such |
| 82 | +log_warnings = 2 |
| 83 | +# |
| 84 | +# Here you can see queries with especially long duration |
| 85 | +slow_query_log |
| 86 | +slow_query_log_file = /var/log/mysql/mariadb-slow.log |
| 87 | +long_query_time = 10 |
| 88 | +#log_slow_rate_limit = 1000 |
| 89 | +log_slow_verbosity = query_plan |
| 90 | + |
| 91 | +#log-queries-not-using-indexes |
| 92 | +log_slow_admin_statements |
| 93 | +# |
| 94 | +# The following can be used as easy to replay backup logs or for replication. |
| 95 | +# note: if you are setting up a replication slave, see README.Debian about |
| 96 | +# other settings you may need to change. |
| 97 | +#server-id = 1 |
| 98 | +#report_host = master1 |
| 99 | +#auto_increment_increment = 2 |
| 100 | +#auto_increment_offset = 1 |
| 101 | +log_bin = /var/log/mysql/mariadb-bin |
| 102 | +log_bin_index = /var/log/mysql/mariadb-bin.index |
| 103 | +# not fab for performance, but safer |
| 104 | +#sync_binlog = 1 |
| 105 | +expire_logs_days = 10 |
| 106 | +max_binlog_size = 100M |
| 107 | +# slaves |
| 108 | +#relay_log = /var/log/mysql/relay-bin |
| 109 | +#relay_log_index = /var/log/mysql/relay-bin.index |
| 110 | +#relay_log_info_file = /var/log/mysql/relay-bin.info |
| 111 | +#log_slave_updates |
| 112 | +#read_only |
| 113 | +# |
| 114 | +# |
| 115 | +# * InnoDB |
| 116 | +# |
| 117 | +# InnoDB is enabled by default with a 10MB datafile in /var/lib/mysql/. |
| 118 | +# Read the manual for more InnoDB related options. There are many! |
| 119 | +default_storage_engine = InnoDB |
| 120 | +sql_mode = NO_ENGINE_SUBSTITUTION,TRADITIONAL |
| 121 | +# you can't just change log file size, requires special procedure |
| 122 | +innodb_log_file_size = 16M |
| 123 | +innodb_buffer_pool_size = 265M |
| 124 | +innodb_log_buffer_size = 8M |
| 125 | +innodb_file_per_table = 1 |
| 126 | +innodb_open_files = 400 |
| 127 | +innodb_io_capacity = 400 |
| 128 | +innodb_flush_method = O_DIRECT |
| 129 | +# |
| 130 | +# * Security Features |
| 131 | +# |
| 132 | +# Read the manual, too, if you want chroot! |
| 133 | +# chroot = /var/lib/mysql/ |
| 134 | +# |
| 135 | +# For generating SSL certificates I recommend the OpenSSL GUI "tinyca". |
| 136 | +# |
| 137 | +# ssl-ca=/etc/mysql/cacert.pem |
| 138 | +# ssl-cert=/etc/mysql/server-cert.pem |
| 139 | +# ssl-key=/etc/mysql/server-key.pem |
| 140 | + |
| 141 | + |
| 142 | + |
| 143 | +[mysqldump] |
| 144 | +quick |
| 145 | +quote-names |
| 146 | +max_allowed_packet = 16M |
| 147 | + |
| 148 | +[mysql] |
| 149 | +#no-auto-rehash # faster start of mysql but no tab completition |
| 150 | + |
| 151 | +[isamchk] |
| 152 | +key_buffer = 16M |
0 commit comments