Skip to content

Instantly share code, notes, and snippets.

@angelflo
Forked from yvoronoy/my.cnf
Created January 30, 2018 09:09
Show Gist options
  • Save angelflo/1508b6a9c7cd8c14a60795ce9ec71e3d to your computer and use it in GitHub Desktop.
Save angelflo/1508b6a9c7cd8c14a60795ce9ec71e3d 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment