# This was formally known as [safe_mysqld]. Both versions are currently parsed. [mysqld_safe] socket = /var/run/mysqld/mysqld.sock #nice = -10 open-files-limit=8192 [mysqld] old_passwords = false # inserted by debconf # # * Basic Settings # user = mysql pid-file = /var/run/mysqld/mysqld.pid socket = /var/run/mysqld/mysqld.sock port = 3306 basedir = /usr datadir = /data/mysql tmpdir = /data/mysql/tmp language = /usr/share/mysql/english skip-external-locking skip-slave-start back_log = 200 max_connect_errors = 9999999 key_buffer = 64M max_allowed_packet = 16M thread_stack = 128K table_cache = 512 sort_buffer_size = 2M join_buffer_size = 1M read_buffer_size = 1M read_rnd_buffer_size = 1M thread_cache = 8 query_cache_size = 48M tmp_table_size = 48M query_cache_limit = 2M # This buffer is allocated when MySQL needs to rebuild the index in # REPAIR, OPTIMIZE, ALTER table statements as well as in LOAD DATA INFILE # into an empty table. It is allocated per thread so be careful with # large settings. myisam_sort_buffer_size = 64M # The maximum size of the temporary file MySQL is allowed to use while # recreating the index (during REPAIR, ALTER TABLE or LOAD DATA INFILE. # If the file-size would be bigger than this, the index will be created # through the key cache (which is slower). myisam_max_sort_file_size = 10G # If the temporary file used for fast index creation would be bigger # than using the key cache by the amount specified here, then prefer the # key cache method. This is mainly used to force long character keys in # large tables to use the slower key cache method to create the index. myisam_max_extra_sort_file_size = 10G # If a table has more than one index, MyISAM can use more than one # thread to repair them by sorting in parallel. This makes sense if you # have multiple CPUs and plenty of memory. myisam_repair_threads = 1 # # * Query Cache Configuration # query_cache_type = 1 # # * Logging and Replication # # Both location gets rotated by the cronjob. # Be aware that this log type is a performance killer. #log = /var/log/mysql.log #log = /var/log/mysql/mysql.log # # Error logging goes to syslog. This is a Debian improvement :) # # Here you can see queries with especially long duration log-slow-queries = /var/log/mysql/mysql-slow.log long_query_time = 2 # # The following can be used as easy to replay backup logs or for replication. server-id = 1 log-bin = /data/mysql/mysql-bin.log expire-logs-days = 20 # # * BerkeleyDB # # According to an MySQL employee the use of BerkeleyDB is now discouraged # and support for it will probably cease in the next versions. skip-bdb # # * 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! innodb_buffer_pool_size = 2800M innodb_file_per_table = true innodb_data_file_path= ibdata1:2G;ibdata2:1G:autoextend innodb_data_home_dir = /data/mysql innodb_flush_method = O_DIRECT innodb_log_buffer_size = 16M innodb_log_file_size = 512M innodb_log_group_home_dir = /data/mysql innodb_additional_mem_pool_size=20M # 2..4(NumCpu+NumDrives) innodb_thread_concurrency = 12 # fully acid innodb_flush_log_at_trx_commit = 1 sync_binlog=1 # no need of XA innodb_support_xa=0