Skip to content

Instantly share code, notes, and snippets.

@valdergallo
Created July 17, 2012 16:40
Show Gist options
  • Save valdergallo/3130504 to your computer and use it in GitHub Desktop.
Save valdergallo/3130504 to your computer and use it in GitHub Desktop.
MySQL config with InnoDB
[client]
port=3306
socket=/tmp/mysql.sock
[mysqld]
port=3306
socket=/tmp/mysql.sock
tmp_table_size = 32M
max_heap_table_size = 32M
max_allowed_packet = 32M
table_cache = 1800
sort_buffer_size = 16M
read_buffer_size = 8M
read_rnd_buffer_size = 524288
myisam_sort_buffer_size = 256M
thread_cache_size = 384
bulk_insert_buffer_size = 8M
query_cache_limit = 4M
query_cache_size = 128M
query_cache_type = 1
log-bin = mysql-bin
tmpdir=/tmp
skip-external-locking
key_buffer=16M
max_allowed_packet=16000M
thread_stack=128K
thread_cache_size=8
query_cache_limit=1M
query_cache_size=1024M
sort_buffer=512M
thread_concurrency=32
record_buffer=128M
query_cache_type=2
tmp_table_size=1G
expire_logs_days=10
max_binlog_size=100M
# InnoDB configuration
default-storage-engine = InnoDB
innodb_flush_log_at_trx_commit=1
innodb_force_recovery = 4
innodb_buffer_pool_size=1024M
innodb_additional_mem_pool_size=400M
innodb_flush_method=O_DSYNC
innodb_log_file_size=5M
innodb_log_buffer_size=10M
[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
log_slow_queries = /var/log/mysqld_slow_queries.log
[mysqldump]
quick
[isamchk]
key_buffer=16M
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment