Skip to content

Instantly share code, notes, and snippets.

@enricodeleo
Created March 1, 2014 14:15
Show Gist options
  • Save enricodeleo/9290328 to your computer and use it in GitHub Desktop.
Save enricodeleo/9290328 to your computer and use it in GitHub Desktop.
MySQL optimized my.cnf for Magento store on 1GB ram VPS
[mysqld]
# GENERAL #
user = mysql
default-storage-engine = InnoDB
socket = /var/lib/mysql/mysql.sock
pid-file = /var/lib/mysql/mysql.pid
# MyISAM #
key-buffer-size = 32M
myisam-recover = FORCE,BACKUP
# SAFETY #
max-allowed-packet = 16M
max-connect-errors = 1000000
# DATA STORAGE #
datadir = /var/lib/mysql/
# CACHES AND LIMITS #
tmp-table-size = 32M
max-heap-table-size = 32M
query-cache-type = 0
query-cache-size = 0
max-connections = 100
thread-cache-size = 16
open-files-limit = 65535
table-definition-cache = 4096
table-open-cache = 4096
innodb-flush-log-at-trx-commit = 1
innodb-file-per-table = 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment