Created
February 14, 2017 21:15
-
-
Save mpchadwick/ad46c2e5fd4da3edfa322984651193a2 to your computer and use it in GitHub Desktop.
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
# generated by Chef for node localhost | |
# | |
# The MySQL database server configuration file. | |
# | |
# You can copy this to one of: | |
# - "/etc/mysql/my.cnf" to set global options, | |
# - "~/.my.cnf" to set user-specific options. | |
# | |
# One can use all long options that the program supports. | |
# Run program with --help to get a list of available options and with | |
# --print-defaults to see which it would actually understand and use. | |
# | |
# For explanations see | |
# http://dev.mysql.com/doc/mysql/en/server-system-variables.html | |
# This will be passed to all mysql clients | |
# It has been reported that passwords should be enclosed with ticks/quotes | |
# escpecially if they contain "#" chars... | |
# Remember to edit /etc/mysql/debian.cnf when changing the socket location. | |
[client] | |
port = 3306 | |
socket = /var/lib/mysql/mysql.sock | |
# Here is entries for some specific programs | |
# The following values assume you have at least 32M ram | |
# This was formally known as [safe_mysqld]. Both versions are currently parsed. | |
[mysqld_safe] | |
socket = /var/lib/mysql/mysql.sock | |
nice = 0 | |
open-files-limit = 16384 | |
[mysqld] | |
# | |
# * Basic Settings | |
# | |
user = mysql | |
pid-file = /var/lib/mysql/mysqld.pid | |
socket = /var/lib/mysql/mysql.sock | |
port = 3306 | |
basedir = /usr | |
datadir = /var/lib/mysql | |
tmpdir = /tmp | |
slave_load_tmpdir = /tmp | |
# language = /usr/share/mysql/english | |
character_set_server = utf8 | |
collation_server = utf8_unicode_ci | |
skip-external-locking | |
net_read_timeout = 120 | |
connect_timeout = 10 | |
wait_timeout = 28800 | |
# | |
# For compatibility to other Debian packages that still use | |
# libmysqlclient10 and libmysqlclient12. | |
old_passwords = | |
# | |
# Instead of skip-networking the default is now to listen only on | |
# localhost which is more compatible and is not less secure. | |
bind-address = 127.0.0.1 | |
# | |
# * Fine Tuning | |
# | |
key_buffer = 16M | |
# The maximum size of a query packet the server can handle as well as | |
# maximum query size server can process (Important when working with | |
# large BLOBs). enlarged dynamically, for each connection. | |
max_allowed_packet = 64M | |
# Maximum String length size of a group concat result | |
group_concat_max_len = 4096 | |
# Thread stack size to use. This amount of memory is always reserved at | |
# connection time. MySQL itself usually needs no more than 64K of | |
# memory, while if you use your own stack hungry UDF functions or your | |
# OS requires more stack for some operations, you might need to set this | |
# to a higher value. | |
thread_stack = 192K | |
thread_cache_size = 16 | |
# 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 | |
# | |
query_cache_limit = 2M | |
query_cache_size = 64M | |
# | |
# * 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 at runtime! | |
#log_type = FILE | |
#general_log = /var/log/mysql/mysql.log | |
# | |
# Error logging goes to syslog due to /etc/mysql/conf.d/mysqld_safe_syslog.cnf. | |
# | |
# 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! | |
# Use this option if you have a MySQL server with InnoDB support enabled | |
# but you do not plan to use it. This will save memory and disk space | |
# and speed up some things. | |
# Additional memory pool that is used by InnoDB to store metadata | |
# information. If InnoDB requires more memory for this purpose it will | |
# start to allocate it from the OS. As this is fast enough on most | |
# recent operating systems, you normally do not need to change this | |
# value. SHOW INNODB STATUS will display the current amount used. | |
innodb_additional_mem_pool_size = 32M | |
# This config file assumes a main memory of at least 8G | |
innodb_buffer_pool_size = 128M | |
# InnoDB stores data in one or more data files forming the tablespace. | |
# If you have a single logical drive for your data, a single | |
# autoextending file would be good enough. In other cases, a single file | |
# per device is often a good choice. You can configure InnoDB to use raw | |
# disk partitions as well - please refer to the manual for more info | |
# about this. | |
# to prevent fragmentation of the InnoDB tablespace, either create a | |
# very big initial datafile, or set the autoextend amount to a large | |
# value. The disadvantage of using a large autoextend size is that the | |
# server may take some time to extend the file when needed | |
# can't specify tablespace sizes for innodb-file-per-table tablespaces | |
# so using a big autoextend is preferable in those cases. | |
innodb_data_file_path = ibdata1:10M:autoextend | |
# innodb_autoextend_increment = 128M | |
innodb_file_per_table | |
# The file format to use for new InnoDB tables. | |
# Currently Antelope and Barracuda are supported. | |
# This applies only for tables that have their own tablespace, | |
# so for it to have an effect innodb_file_per_table must be enabled. | |
innodb_file_format = Antelope | |
# Set this option if you would like the InnoDB tablespace files to be | |
# stored in another location. By default this is the MySQL datadir. | |
# Number of threads allowed inside the InnoDB kernel. The optimal value | |
# depends highly on the application, hardware as well as the OS | |
# scheduler properties. A too high value may lead to thread thrashing. | |
innodb_thread_concurrency = 16 | |
# If set to 1, InnoDB will flush (fsync) the transaction logs to the | |
# disk at each commit, which offers full ACID behavior. If you are | |
# willing to compromise this safety, and you are running small | |
# transactions, you may set this to 0 or 2 to reduce disk I/O to the | |
# logs. Value 0 means that the log is only written to the log file and | |
# the log file flushed to disk approximately once per second. Value 2 | |
# means the log is written to the log file at each commit, but the log | |
# file is only flushed to disk approximately once per second. | |
innodb_flush_log_at_trx_commit = 1 | |
# Speed up InnoDB shutdown. This will disable InnoDB to do a full purge | |
# and insert buffer merge on shutdown. It may increase shutdown time a | |
# lot, but InnoDB will have to do it on the next startup instead. | |
# The size of the buffer InnoDB uses for buffering log data. As soon as | |
# it is full, InnoDB will have to flush it to disk. As it is flushed | |
# once per second anyway, it does not make sense to have it very large | |
# (even with long transactions). | |
innodb_log_buffer_size = 64M | |
# Size of each log file in a log group. You should set the combined size | |
# of log files to about 25%-100% of your buffer pool size to avoid | |
# unneeded buffer pool flush activity on log file overwrite. However, | |
# note that a larger logfile size will increase the time needed for the | |
# recovery process. | |
# make sure the log files are large enough that you don't hold up | |
# checkpoints when the logs rotate! | |
innodb_log_file_size = 5M | |
# Total number of files in the log group. A value of 2-3 is usually good | |
# enough. | |
innodb_log_files_in_group = 2 | |
# Location of the InnoDB log files. Default is the MySQL datadir. You | |
# may wish to point it to a dedicated hard drive or a RAID1 volume for | |
# improved performance | |
# be careful if you use LVM and plan to snapshot your filesystem for hot | |
# backup. your log files must be on the same logical volume as your data | |
# files in order for this to work. | |
#innodb_log_group_home_dir | |
# Maximum allowed percentage of dirty pages in the InnoDB buffer pool. | |
# If it is reached, InnoDB will start flushing them out agressively to | |
# not run out of clean pages at all. This is a soft limit, not | |
# guaranteed to be held. | |
innodb_max_dirty_pages_pct = 80 | |
# The flush method InnoDB will use for Log. The tablespace always uses | |
# doublewrite flush logic. The default value is "fdatasync", another | |
# option is "O_DSYNC". | |
# use directIO to bypass filesystem cache where possible | |
innodb_flush_method = O_DIRECT | |
# How long an InnoDB transaction should wait for a lock to be granted | |
# before being rolled back. InnoDB automatically detects transaction | |
# deadlocks in its own lock table and rolls back the transaction. If you | |
# use the LOCK TABLES command, or other transaction-safe storage engines | |
# than InnoDB in the same transaction, then a deadlock may arise which | |
# InnoDB cannot notice. In cases like this the timeout is useful to | |
# resolve the situation. | |
innodb_lock_wait_timeout = 120 | |
# Let as many clients commit at once as necessary | |
# If you have a very intensive write application or if you have | |
# innodb_flush_logs_at_trx <> 1 it may make sense to play with this. | |
# with this configuration it probably won't matter anyway, because binary | |
# logging is enabled, which enforces serialized commits, even when the | |
# isolation level isn't serializable. | |
innodb_commit_concurrency=0 | |
innodb_open_files=2000 | |
# | |
# * 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 = 64M | |
[mysql] | |
#no-auto-rehash # faster start of mysql but no tab completition | |
[isamchk] | |
key_buffer = 16M | |
# | |
# * IMPORTANT: Additional settings that can override those from this file! | |
# The files must end with '.cnf', otherwise they'll be ignored. | |
# |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment