Skip to content

Instantly share code, notes, and snippets.

@nathmisaki
Created September 13, 2011 20:59
Show Gist options
  • Save nathmisaki/1215156 to your computer and use it in GitHub Desktop.
Save nathmisaki/1215156 to your computer and use it in GitHub Desktop.
my.cnf
[client]
port = 3306
socket = /var/run/mysqld/mysqld.sock
[mysqld_safe]
socket = /var/run/mysqld/mysqld.sock
nice = 0
[mysqld]
user = mysql
socket = /var/run/mysqld/mysqld.sock
port = 3306
basedir = /usr
datadir = /var/lib/mysql
tmpdir = /tmp
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 = 16M
max_allowed_packet = 16M
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 = 100
table_cache = 512
#thread_concurrency = 10
#
# * Query Cache Configuration
#
query_cache_limit = 1M
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
log_error = /var/log/mysql/error.log
# 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
innodb_buffer_pool_size = 512M
innodb_flush_log_at_trx_commit = 2
innodb_thread_concurrency = 8
innodb_flush_method = O_DIRECT
innodb_additional_mem_pool_size = 20MB
thread_concurrency = 16
log = /var/log/mysql/mysql.log
log_slow_queries = /var/log/mysql/mysql-slow.log
long_query_time = 2
relay-log-space-limit = 512M
tmp_table_size = 512M
max_heap_table_size = 512M
join_buffer_size = 128M
skip-name-resolve
max_connections = 50
[mysqldump]
quick
quote-names
max_allowed_packet = 512M
[mysql]
[isamchk]
key_buffer = 128M
!includedir /etc/mysql/conf.d/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment