[client] port = 3306 socket = /var/run/mysqld/mysqld.sock [mysqld_safe] 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 skip-external-locking bind-address = 0.0.0.0 # # * Fine Tuning # key_buffer = 2G thread_stack = 400K thread_cache_size = 8 # This replaces the startup script and checks MyISAM tables if needed # the first time they are touched myisam-recover = BACKUP #max_connections = 100 #table_cache = 64 #thread_concurrency = 10 # # * Query Cache Configuration # query_cache_limit = 200M query_cache_size = 500M # # * Logging and Replication # # Both location gets rotated by the cronjob. # Be aware that this log type is a performance killer. # As of 5.1 you can enable the log at runtime! #general_log_file = /var/log/mysql/mysql.log #general_log = 1 # # Error logging goes to syslog due to /etc/mysql/conf.d/mysqld_safe_syslog.cnf. # # Here you can see queries with especially long duration #log_slow_queries = /var/log/mysql/mysql-slow.log #long_query_time = 2 #log-queries-not-using-indexes # # The following can be used as easy to replay backup logs or for replication. # note: if you are setting up a replication slave, see README.Debian about # other settings you may need to change. #server-id = 1 #log_bin = /var/log/mysql/mysql-bin.log expire_logs_days = 10 max_binlog_size = 100M #binlog_do_db = include_database_name #binlog_ignore_db = include_database_name # # * InnoDB # # InnoDB is enabled by default with a 10MB datafile in /var/lib/mysql/. # Read the manual for more InnoDB related options. There are many! # # * 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 max_delayed_threads = 100 delayed_queue_size = 10000 sort_buffer_size = 1G delayed_insert_timeout = 600 thread_handling = one-thread-per-connection max_connect_errors = 1000 connect_timeout = 10 max_connections = 1000 delayed_insert_limit = 200 max_allowed_packet = 100M thread_concurrency = 40 net_buffer_length = 16384 myisam_sort_buffer_size = 4G key_buffer_size = 2G innodb_flush_log_at_trx_commit = 0 innodb_io_capacity = 2000 innodb_purge_threads = 1 innodb_log_buffer_size = 5M innodb_additional_mem_pool_size = 10M innodb_lock_wait_timeout = 200 innodb_buffer_pool_size = 1G innodb_change_buffering = inserts skip-name-resolve max_heap_table_size = 4G tmp_table_size = 1G max_join_size = 42949672950 join_buffer_size = 1M myisam_max_sort_file_size = 400G [mysqldump] quick quote-names max_allowed_packet = 160M [mysql] #no-auto-rehash # faster start of mysql but no tab completition [isamchk] key_buffer = 160M # # * IMPORTANT: Additional settings that can override those from this file! # The files must end with '.cnf', otherwise they'll be ignored. # !includedir /etc/mysql/conf.d/