[client] port = 3306 socket = /var/run/mysqld/mysqld.sock [mysqld_safe] socket = /var/run/mysqld/mysqld.sock nice = 0 [mysqld] # GENERAL # user = mysql pid-file = /var/run/mysqld/mysqld.pid socket = /var/run/mysqld/mysqld.sock port = 3306 # ALLOW OTHER MACHINE # bind-address = 0.0.0.0 # MyISAM # key-buffer-size = 512M myisam_recover_options = FORCE,BACKUP myisam_sort_buffer_size = 512M # SAFETY # max-allowed-packet = 64M max-connect-errors = 1000000 skip-name-resolve skip-external-locking sql-mode = NO_ENGINE_SUBSTITUTION # DATA STORAGE # basedir = /usr datadir = /var/lib/mysql tmpdir = /tmp lc_messages_dir = /usr/share/mysql lc_messages = en_US # CACHES AND LIMITS # tmp-table-size = 128M max-heap-table-size = 128M query-cache-type = 0 query-cache-size = 0 max-connections = 1000 connect_timeout = 300 interactive_timeout = 300 wait_timeout = 30 thread-cache-size = 128 open-files-limit = 64000 table-definition-cache = 4096 table-open-cache = 10240 # INNODB # innodb-flush-method = O_DIRECT #innodb-log-files-in-group = 2 innodb-log-file-size = 1G #innodb-flush-log-at-trx-commit = 1 innodb-file-per-table = 1 innodb-buffer-pool-size = 4G #innodb_force_recovery = 2 # LOGGING & REPLICATION # #general_log_file = /var/log/mysql/mysql.log #general_log = 1 #log_warnings = 2 #slow_query_log = 1 #slow_query_log_file = /var/log/mysql/mariadb-slow.log #long_query_time = 3.000000 #log_slow_rate_limit = 1000 #log_slow_verbosity = query_plan #log-queries-not-using-indexes #log_slow_admin_statements #server-id = 1 #report_host = master1 #auto_increment_increment = 2 #auto_increment_offset = 1 #log_bin = /var/log/mysql/mariadb-bin #log_bin_index = /var/log/mysql/mariadb-bin.index #sync_binlog = 1 #expire_logs_days = 10 #max_binlog_size = 100M # slaves #relay_log = /var/log/mysql/relay-bin #relay_log_index = /var/log/mysql/relay-bin.index #relay_log_info_file = /var/log/mysql/relay-bin.info #log_slave_updates # * Security Features # # Read the manual, too, if you want chroot! # chroot = /var/lib/mysql/ # # For generating SSL certificates I recommend the OpenSSL GUI "tinyca". # # ssl-ca=/etc/mysql/cacert.pem # ssl-cert=/etc/mysql/server-cert.pem # ssl-key=/etc/mysql/server-key.pem # # * Galera-related settings # [galera] # Mandatory settings wsrep_on = OFF #wsrep_provider = #wsrep_cluster_address = #binlog_format = row #default_storage_engine = InnoDB #innodb_autoinc_lock_mode = 2 # # Allow server to accept connections on all interfaces. # # # Optional setting #wsrep_slave_threads = 1 #innodb_flush_log_at_trx_commit = 0 [mysqldump] quick quote-names max_allowed_packet = 16M [mysql] #no-auto-rehash # faster start of mysql but no tab completion [isamchk] key_buffer = 16M # # * IMPORTANT: Additional settings that can override those from this file! # The files must end with '.cnf', otherwise they'll be ignored. #