Skip to content

Instantly share code, notes, and snippets.

@simpleadm
Forked from yvoronoy/my.cnf
Created December 28, 2017 11:23
Show Gist options
  • Save simpleadm/af122b7eaf05913ec7598d1d047abb7d to your computer and use it in GitHub Desktop.
Save simpleadm/af122b7eaf05913ec7598d1d047abb7d to your computer and use it in GitHub Desktop.
MySQL Magento Config
[mysqld]
## After edit config you have to remove log files and restart mysql server
## because after changing innodb-log-file-size you should recreate ib_logfiles
## Stop MySQL server
## rm /data/dir/ib_logfile*
## Run MySQL server
##Table open cache under MacOS and MySQL 5.6 should be 250.
##Otherwise you will get error MySQL server has gone away
##table-open-cache = 250
table-open-cache = 4096
## Cache
table-definition-cache = 4096
thread-cache-size = 256
query-cache-size = 64M
query-cache-type = 1
## Per-thread Buffers
sort-buffer-size = 16M
## Temp Tables
max-heap-table-size = 512M
tmp-table-size = 512M
## Networking
interactive-timeout = 3600
max-connections = 400
max-connect-errors = 1000000
max-allowed-packet = 512M
skip-name-resolve
skip-secure-auth
wait-timeout = 28800
## MyISAM
key-buffer-size = 256M
#myisam-recover = FORCE,BACKUP
myisam-sort-buffer-size = 128M
## InnoDB
innodb-buffer-pool-size = 2G
innodb-log-file-size = 256M
innodb-thread-concurrency = 18
innodb_flush_log_at_trx_commit = 2
##Fastest
##innodb_flush_log_at_trx_commit = 0
@simpleadm
Copy link
Author

TODO: mysqltuner

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment