Exemple de my.cnf pour Magento 1.6 / 1.7 & 1.8

### LE 26/11/2013
### /etc/mysql/my.cnf   pour Magento sur serveur dédié Ubuntu + Plesk 11.5 

 [client]
 port = 3306
 socket = /var/run/mysqld/mysqld.sock
# Here is entries for some specific programs
# This was formally known as [safe_mysqld]. 
 [mysqld_safe]
 socket = /var/run/mysqld/mysqld.sock
 nice = 0
[mysqld]
 local-infile=0
 # * IMPORTANT
 # adjust /etc/apparmor.d/usr.sbin.mysqld.

user = mysql
socket = /var/run/mysqld/mysqld.sock
port = 3306
basedir = /usr
datadir = /var/lib/mysql
tmpdir = /tmp

###########################################################################
##### POUR AUTORISER L ACCES A LA BASE MYSQL DEPUIS UN AUTRE SERVEUR  #####
###########################################################################
# 1)
###### Cette ligne empèche l'accès a la Base Mysql depuis un autre serveur
###### Mettre un "#" devant = #skip-external-locking #pour autoriser l acces 
skip-external-locking
# 2)
######## d'origine pour LOCALHOST = bind-address = 127.0.0.1
########  NE FONCTIONNE PAS AVEC IP FAILOVER
######## bind-address = 127.0.0.1 
######## *** REMPLACE PAR L ADRESSE DU SERVEUR bind-address = 176.31.***.***
bind-address = 127.0.0.1
###########################################################################
#
# * Fine Tuning
#
# eric --- original etait a  16M
 key_buffer = 32M
# eric --- original etait a  16M
 max_allowed_packet = 32M
 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 = 64
 #thread_concurrency = 10
 #
 # * Query Cache Configuration
 #
 # eric --- original etait   1M
 query_cache_limit = 2M
 # eric --- original etait   16M
 query_cache_size = 64M
 #
####### Ajouter ###################################
 table_cache = 1024
 # 2x le nombre de cores CPU innodb_thread_concurrency = 8
 innodb_thread_concurrency = 8
 innodb_flush_log_at_trx_commit = 0 #(safe vs speed, 0 speed, 1 safe, 2 mixed)
 innodb_log_buffer_size = 32M
# 66% de la mémoire disponible # (3 Go sur un serveur web 8 Go de RAM )

# ceci est important trop de mémoire innodb_buffer peut generer une erreur Magento
# EXEMPLE.. SQLSTATE[4200]: Syntax error or access violation: 1286 Unknown table engine 'InnoDB'
# (1024M sur un site web 4 Go de RAM)

 innodb_buffer_pool_size = 4096M
 innodb_additional_mem_pool_size = 32M
 ######## fin de l'ajout ###############################
################################################
 # * 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
 #binlog_do_db = include_database_name
 #binlog_ignore_db = include_database_name
 #
 # * InnoDB
 #
 # InnoDB is enabled by default with a 10MB datafile in /var/lib/mysql/.
 # Read the manual for more InnoDB related options. There are many!
 #
 # * Security Features
 #
 # Read the manual, too, if you want chroot!
 # chroot = /var/lib/mysql/
 #
 # For generating SSL certificates I recommend the OpenSSL GUI "tinyca".
 #
 # ssl-ca=/etc/mysql/cacert.pem
 # ssl-cert=/etc/mysql/server-cert.pem
 # ssl-key=/etc/mysql/server-key.pem
[mysqldump]
 quick
 quote-names
 max_allowed_packet = 32M
[mysql]
 #no-auto-rehash # faster start of mysql but no tab completition
[isamchk]
 key_buffer = 32M
#
 # * IMPORTANT: Additional settings that can override those from this file!
 # The files must end with '.cnf', otherwise they'll be ignored.
 #
 !includedir /etc/mysql/conf.d/

, , , ,

  1. re-indexer Magento 16 / 1.7 /1.8 en ligne de commande | Eric Kranich

Laisser un commentaire

Entrez vos coordonnées ci-dessous ou cliquez sur une icône pour vous connecter:

Logo WordPress.com

Vous commentez à l'aide de votre compte WordPress.com. Déconnexion / Changer )

Image Twitter

Vous commentez à l'aide de votre compte Twitter. Déconnexion / Changer )

Photo Facebook

Vous commentez à l'aide de votre compte Facebook. Déconnexion / Changer )

Photo Google+

Vous commentez à l'aide de votre compte Google+. Déconnexion / Changer )

Connexion à %s

%d blogueurs aiment cette page :