|
| 1 | +[client] |
| 2 | +port = 3306 |
| 3 | +socket = <SOCKET_PATH>/<SOCKET_FILE> |
| 4 | +default-character-set = <CHARACTER_SET> |
| 5 | + |
| 6 | +[mysqld_safe] |
| 7 | +socket = <SOCKET_PATH>/<SOCKET_FILE> |
| 8 | +nice = 0 |
| 9 | + |
| 10 | +[mysqld] |
| 11 | +user = mariadb |
| 12 | +pid-file = /var/run/mysqld/mysqld.pid |
| 13 | +socket = <SOCKET_PATH>/<SOCKET_FILE> |
| 14 | +port = 3306 |
| 15 | +basedir = /usr |
| 16 | +datadir = /var/lib/mysql |
| 17 | +tmpdir = /tmp |
| 18 | +lc_messages_dir = /usr/share/mysql |
| 19 | +lc_messages = en_US |
| 20 | +skip-external-locking |
| 21 | + |
| 22 | +max_connections = 100 |
| 23 | +connect_timeout = 5 |
| 24 | +wait_timeout = 600 |
| 25 | +max_allowed_packet = 16M |
| 26 | +thread_cache_size = 128 |
| 27 | +sort_buffer_size = 4M |
| 28 | +bulk_insert_buffer_size = 16M |
| 29 | +tmp_table_size = 32M |
| 30 | +max_heap_table_size = 32M |
| 31 | + |
| 32 | +character-set-server = <CHARACTER_SET> |
| 33 | +collation-server = <COLLATION> |
| 34 | + |
| 35 | +# |
| 36 | +# * MyISAM |
| 37 | +# |
| 38 | +# This replaces the startup script and checks MyISAM tables if needed |
| 39 | +# the first time they are touched. On error, make copy and try a repair. |
| 40 | +myisam_recover_options = BACKUP |
| 41 | +key_buffer_size = 128M |
| 42 | +#open-files-limit = 2000 |
| 43 | +table_open_cache = 400 |
| 44 | +myisam_sort_buffer_size = 512M |
| 45 | +concurrent_insert = 2 |
| 46 | +read_buffer_size = 2M |
| 47 | +read_rnd_buffer_size = 1M |
| 48 | + |
| 49 | +# |
| 50 | +# * Query Cache Configuration |
| 51 | +# |
| 52 | +# Cache only tiny result sets, so we can fit more in the query cache. |
| 53 | +query_cache_limit = 128K |
| 54 | +query_cache_size = 64M |
| 55 | +# for more write intensive setups, set to DEMAND or OFF |
| 56 | +#query_cache_type = DEMAND |
| 57 | +# |
| 58 | + |
| 59 | +# * Logging and Replication |
| 60 | +# |
| 61 | +# Both location gets rotated by the cronjob. |
| 62 | +# Be aware that this log type is a performance killer. |
| 63 | +# As of 5.1 you can enable the log at runtime! |
| 64 | +#general_log_file = /var/log/mysql/mysql.log |
| 65 | +#general_log = 1 |
| 66 | +# |
| 67 | +# Error logging goes to syslog due to /etc/mysql/conf.d/mysqld_safe_syslog.cnf. |
| 68 | +# |
| 69 | +# we do want to know about network errors and such |
| 70 | +#log_warnings = 2 |
| 71 | +# |
| 72 | +# Enable the slow query log to see queries with especially long duration |
| 73 | +#slow_query_log[={0|1}] |
| 74 | + |
| 75 | +long_query_time = 10 |
| 76 | +#log_slow_rate_limit = 1000 |
| 77 | +#log_slow_verbosity = query_plan |
| 78 | + |
| 79 | +#log-queries-not-using-indexes |
| 80 | +#log_slow_admin_statements |
| 81 | +# |
| 82 | + |
| 83 | +# The following can be used as easy to replay backup logs or for replication. |
| 84 | +# note: if you are setting up a replication slave, see README.Debian about |
| 85 | +# other settings you may need to change. |
| 86 | +#server-id = 1 |
| 87 | +#report_host = master1 |
| 88 | +#auto_increment_increment = 2 |
| 89 | +#auto_increment_offset = 1 |
| 90 | +#log_bin = /var/log/mysql/mariadb-bin |
| 91 | +#log_bin_index = /var/log/mysql/mariadb-bin.index |
| 92 | +# not fab for performance, but safer |
| 93 | +#sync_binlog = 1 |
| 94 | +expire_logs_days = 10 |
| 95 | +max_binlog_size = 100M |
| 96 | +# slaves |
| 97 | +#relay_log = /var/log/mysql/relay-bin |
| 98 | +#relay_log_index = /var/log/mysql/relay-bin.index |
| 99 | +#relay_log_info_file = /var/log/mysql/relay-bin.info |
| 100 | +#log_slave_updates |
| 101 | +#read_only |
| 102 | +# |
| 103 | +# If applications support it, this stricter sql_mode prevents some |
| 104 | +# mistakes like inserting invalid dates etc. |
| 105 | +#sql_mode = NO_ENGINE_SUBSTITUTION,TRADITIONAL |
| 106 | + |
| 107 | +# |
| 108 | +# * InnoDB |
| 109 | +# |
| 110 | +# InnoDB is enabled by default with a 10MB datafile in /var/lib/mysql/. |
| 111 | +# Read the manual for more InnoDB related options. There are many! |
| 112 | +default_storage_engine = InnoDB |
| 113 | +# you can't just change log file size, requires special procedure |
| 114 | +#innodb_log_file_size = 50M |
| 115 | +innodb_buffer_pool_size = 256M |
| 116 | +innodb_log_buffer_size = 8M |
| 117 | +innodb_file_per_table = 1 |
| 118 | +innodb_open_files = 400 |
| 119 | +innodb_io_capacity = 400 |
| 120 | +innodb_flush_method = O_DIRECT |
| 121 | + |
| 122 | +# |
| 123 | +# * Security Features |
| 124 | +# |
| 125 | +# Read the manual, too, if you want chroot! |
| 126 | +# = /var/lib/mysql/ |
| 127 | +# |
| 128 | +# For generating SSL certificates I recommend the OpenSSL GUI "tinyca". |
| 129 | +# |
| 130 | +# ssl-ca=/etc/mysql/cacert.pem |
| 131 | +# ssl-cert=/etc/mysql/server-cert.pem |
| 132 | +# ssl-key=/etc/mysql/server-key.pem |
| 133 | + |
| 134 | +# |
| 135 | +# * Galera-related settings |
| 136 | +# |
| 137 | +[galera] |
| 138 | +# Mandatory settings |
| 139 | +#wsrep_on =ON |
| 140 | +#wsrep_provider = |
| 141 | +#wsrep_cluster_address = |
| 142 | +#binlog_format =row |
| 143 | +#default_storage_engine =InnoDB |
| 144 | +#innodb_autoinc_lock_mode =2 |
| 145 | +# |
| 146 | +# Allow server to accept connections on all interfaces. |
| 147 | +# |
| 148 | +#bind-address =0.0.0.0 |
| 149 | +# |
| 150 | +# Optional setting |
| 151 | +#wsrep_slave_threads =1 |
| 152 | +#innodb_flush_log_at_trx_commit =0 |
| 153 | + |
| 154 | +[mysqldump] |
| 155 | +quick |
| 156 | +quote-names |
| 157 | +max_allowed_packet = 16M |
| 158 | + |
| 159 | +[mysql] |
| 160 | +#no-auto-rehash # faster start of mysql but no tab completion |
| 161 | + |
| 162 | +[isamchk] |
| 163 | +key_buffer = 16M |
| 164 | + |
| 165 | +# |
| 166 | +# * IMPORTANT: Additional settings that can override those from this file! |
| 167 | +# The files must end with '.cnf', otherwise they'll be ignored. |
| 168 | +# |
| 169 | + |
0 commit comments