Skip to content

Instantly share code, notes, and snippets.

@NerOcrO
Last active August 10, 2019 18:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save NerOcrO/8881604 to your computer and use it in GitHub Desktop.
Save NerOcrO/8881604 to your computer and use it in GitHub Desktop.
mysql
  • Finalement, je me rends compte qu'il n'y a pas grand chose à faire pour un poste de dev à partir du moment où je ne laisse pas mon poste allumé tout le temps.
  • A savoir que la plupart des variables sont à mettre dans [mysqld] pour qu'elles soient prises en compte.
  • https://www.askapache.com/mysql/mysql-performance-tuning/
  • Il faut un MySQL allumé et utilisé depuis longtemps pour avoir des recommandations pertinentes
  • Ceci dit, quelques améliorations demandé par mysqltuner :
# sudo vim /etc/mysql/conf.d/perso.cnf
[mysqld]
key_buffer_size = 128M
query_cache_limit = 2048M
table_open_cache = 10000 # anciennement table_cache
tmp_table_size = 1024M
max_heap_table_size = 1024M
innodb_buffer_pool_size = 2048M
innodb_flush_log_at_trx_commit = 2 # permet d'écrire plus vite (dev)!
innodb_file_per_table = 1
# Mettre en commentaire log_error : sudo vim /etc/mysql/mysql.conf.d/mysqld.cnf.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment