# MariaDB database server configuration file. # Designed for less than 1GB RAM on combined server [client] port = 3306 socket = /var/run/mysqld/mysqld.sock default-character-set = utf8 [mysqld_safe] syslog socket = /var/run/mysqld/mysqld.sock nice = 0 [mysqld] # * Basic Settings user = mysql pid-file = /var/run/mysqld/mysqld.pid socket = /var/run/mysqld/mysqld.sock port = 3306 basedir = /usr datadir = /var/lib/mysql tmpdir = /tmp lc_messages_dir = /usr/share/mysql lc_messages = en_US skip-external-locking bind-address = 127.0.0.1 # * Character Sets and Collations character-set-server = utf8 collation-server = utf8_general_ci character_set_server = utf8 collation_server = utf8_general_ci init-connect = 'SET NAMES utf8' init_connect = 'SET collation_connection = utf8_general_ci' skip-character-set-client-handshake # * Fine Tuning max_connections = 50 connect_timeout = 5 wait_timeout = 6000 max_allowed_packet = 64M thread_cache_size = 128 sort_buffer_size = 512KB bulk_insert_buffer_size = 16M tmp_table_size = 120M max_heap_table_size = 120M # * MyISAM myisam_recover = BACKUP key_buffer_size = 196KB #open-files-limit = 2000 table_open_cache = 400 myisam_sort_buffer_size = 512M concurrent_insert = 2 read_buffer_size = 256KB read_rnd_buffer_size = 1M # * Query Cache Configuration query_cache_limit = 128K query_cache_size = 32M # * Logging and 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 = 10 #log_slow_rate_limit = 1000 log_slow_verbosity = query_plan #log-queries-not-using-indexes #log_slow_admin_statements #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 #binlog_format = MIXED # Use for production sql_mode = NO_ENGINE_SUBSTITUTION,TRADITIONAL # Use for transfers #sql_mode = STRICT_TRANS_TABLES,STRICT_ALL_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION # * InnoDB default_storage_engine = InnoDB #innodb_log_file_size = 50M innodb_buffer_pool_size = 9M innodb_log_buffer_size = 1M innodb_file_per_table = 1 innodb_open_files = 400 innodb_io_capacity = 400 innodb_flush_method = O_DIRECT [mysqldump] quick quote-names max_allowed_packet = 64M [mysql] #default-character-set = utf8 [isamchk] key_buffer = 16M #!includedir /etc/mysql/conf.d/