# # The MySQL database server configuration file. # # You can copy this to one of: # - "/etc/mysql/my.cnf" to set global options, # - "~/.my.cnf" to set user-specific options. # # One can use all long options that the program supports. # Run program with --help to get a list of available options and with # --print-defaults to see which it would actually understand and use. # # For explanations see # http://dev.mysql.com/doc/mysql/en/server-system-variables.html # This will be passed to all mysql clients # It has been reported that passwords should be enclosed with ticks/quotes # escpecially if they contain "#" chars... # Remember to edit /etc/mysql/debian.cnf when changing the socket location. [client] port = 3306 socket = /var/run/mysqld/mysqld.sock #default-character-set = utf8 # Here is entries for some specific programs # The following values assume you have at least 32M ram # This was formally known as [safe_mysqld]. Both versions are currently parsed. [mysqld_safe] socket = /var/run/mysqld/mysqld.sock nice = 0 open-files-limit = 8192 [mysqld] #Large Page Support #large-pages # # * 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-message-dir is unknown to MySQL 5.1 #lc-messages-dir = /usr/share/mysql skip-external-locking # # Instead of skip-networking the default is now to listen only on # localhost which is more compatible and is not less secure. #bind-address = 127.0.0.1 # # * Fine Tuning # key_buffer = 64M max_allowed_packet = 512M thread_stack = 192K 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 = 512 table_cache = 3172 thread_concurrency = 10 # # * Query Cache Configuration # query_cache_limit = 2048M query_cache_size = 16M # # * 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 slow_query_log = 1 slow_query_log_file = /var/log/mysql/mysql-slow.log #long_query_time = 2 log-queries-not-using-indexes #slave-skip-errors = 1032 ; skip 1062 error on the slave # # 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-format = MIXED #binlog_do_db = include_database_name #binlog_ignore_db = include_database_name relay-log = /var/log/mysql/mysqld-relay-bin # Character Set # Character Set UTF8 character-set-server=utf8 collation-server=utf8_general_ci init-connect='SET NAMES utf8' # # * 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 log-error = /var/log/mysql-error.log secure_file_priv = /var/www/temp # # 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 # InnoDB Specific Settings #Defaulting to InnoDB default-storage-engine = innodb #File per table innodb_file_per_table = 1 #Buffer DELETE & UPDATE queries innodb_change_buffering = all #Flush to disk per second innodb_flush_log_at_trx_commit = 2 #READ-Commited transaction-isolation = READ-COMMITTED #Disable use of malloc innodb_use_sys_malloc = 0 #Pool Size = 80% of mem innodb_buffer_pool_size = 16000M #Multiple buffer pools innodb_buffer_pool_instances = 10 #Additional Pool Size innodb_additional_mem_pool_size = 64M #Log-files 1/4 of pool size innodb_log_file_size = 2046M #Log buffer size innodb_log_buffer_size = 8M #Flush method sets to O_DIRECT innodb_flush_method = O_DIRECT #Adaptive Hash Index Enable innodb_adaptive_hash_index = 1 #The main thread in InnoDB tries to write pages from the buffer pool so that the percentage of dirty (not yet written) pages will not exceed this value. innodb_max_dirty_pages_pct = 90 #Limit thread concurrency innodb_thread_concurrency = 32 #The number of threads that can enter InnoDB concurrently is determined by the innodb_thread_concurrency variable. A thread is placed in a queue when it tries to enter InnoDB if the number of threads has already reached the concurrency limit. When a thread is permitted to enter InnoDB, it is given a number of “free tickets” equal to the value of innodb_concurrency_tickets, and the thread can enter and leave InnoDB freely until it has used up its tickets. After that point, the thread again becomes subject to the concurrency check (and possible queuing) the next time it tries to enter InnoDB. The default value is 500. innodb_concurrency_tickets = 5000 #Purge Master threads (Experimental) #innodb_purge_threads = 1 #Disable spin wait delay for locking improvement innodb_spin_wait_delay = 0 [mysqldump] quick quote-names no-autocommit max_allowed_packet = 256M [mysql] #no-auto-rehash # faster start of mysql but no tab completition [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. # !includedir /etc/mysql/conf.d/