Last active
August 29, 2015 14:21
-
-
Save ioggstream/feab1352a6ffe6c49b20 to your computer and use it in GitHub Desktop.
Sample My.cnf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# A set of default configurations for MySQL | |
# | |
[mysql] | |
socket=/var/lib/mysql/mysql.sock | |
# | |
# Configurazione per mysql enterprise backup | |
# | |
[mysqlbackup] | |
user=mysqlbackup | |
backup_dir=/backup/full | |
incremental_backup_dir=/backup/incremental | |
with_timestamp | |
socket=/var/lib/mysql/mysql.sock | |
# | |
# MySQL Server | |
# | |
[mysqld] | |
# Suggested values for security and consistency | |
explicit_defaults_for_timestamp | |
local-infile=0 | |
# Be consistent | |
sql-mode=STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION | |
# Avoid unnecessary reverse lookups if | |
# we're on a secure network | |
skip-name-resolve | |
# Dump core file in case of crash: XXX | |
# XXX can we specify a location? | |
core-file | |
# The default character set that will be used when a new schema or table is | |
# created and no character set is defined | |
# Use UTF-8 encoding for tables (or latin1) | |
character_set_server=utf8 | |
collation_server=utf8_general_ci | |
# | |
# Questo e' da testare col vostro db | |
# | |
lower_case_table_names=1 | |
# | |
# Connectivita' | |
# | |
max_connections=256 | |
table_open_cache=200 | |
thread_cache_size=3 | |
# | |
# Nuovo modello di replicazione GTID | |
# che andra' abilitato in seguito | |
# | |
gtid-mode=ON | |
enforce-gtid-consistency | |
log-slave-updates | |
# | |
# and crash-safe replication | |
# | |
relay-log-recovery=1 | |
relay-log=relay-bin | |
master-info-repository=TABLE | |
relay-log-info-repository=TABLE | |
# | |
# Questi sono i setting che possiamo impostare | |
# senza ulteriori modifiche | |
innodb-flush-log-at-trx-commit=1 | |
innodb_flush_method=O_DIRECT | |
innodb-log-files-in-group=3 | |
innodb-log-buffer-size=8 | |
innodb-fast-shutdown=0 | |
innodb_buffer_pool_size=80_percento_della_ram_ma_credo_sia_troppo | |
# | |
# Se usate myisam dovete aumentare questo | |
# | |
myisam-recover-options=FORCE,BACKUP | |
# Limita la memoria usata da MyISAM se non ne | |
# abbiamo bisogno. Altrimenti va' tunato. | |
key_buffer_size=16K | |
## Options for slave replication | |
#slave-net-timeout=60 | |
#read-only | |
# | |
# Monitor slow queries | |
# - logga le query piu' lente di 2 secondi. | |
slow-query-log=1 | |
slow-query-log-file=slow-query.log | |
long-query-time=2 | |
# Additional features | |
# questo metterei a 0 intanto | |
event-scheduler=0 | |
# Monitoring and Replication facilities | |
report-host=$HOSTNAME | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment