1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586 |
- # For advice on how to change settings please see
- # http://dev.mysql.com/doc/refman/5.7/en/server-configuration-defaults.html
- [mysql]
- # CLIENT #
- port = 3306
- socket =/var/lib/mysql/mysql.sock
- default-character-set = utf8mb4
- [mysqld]
- #
- # Remove leading # and set to the amount of RAM for the most important data
- # cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%.
- # innodb_buffer_pool_size = 128M
- #
- # Remove leading # to turn on a very important data integrity option: logging
- # changes to the binary log between backups.
- log_bin=binlog
- binlog-do-db = test
- binlog-ignore-db = mysql
- binlog-ignore-db = information_schema
- binlog-ignore-db = performance_schema
- binlog-ignore-db = sys
- expire_logs_days=7
- binlog_format=ROW
- max_binlog_size=100M
- binlog_cache_size=16M
- max_binlog_cache_size=256M
- relay_log_recovery=1
- sync_binlog=1
- server-id=1
- #
- # Remove leading # to set options mainly useful for reporting servers.
- # The server defaults are faster for transactions and fast SELECTs.
- # Adjust sizes as needed, experiment to find the optimal values.
- # join_buffer_size = 128M
- # sort_buffer_size = 2M
- # read_rnd_buffer_size = 2M
- datadir=/var/lib/mysql
- socket=/var/lib/mysql/mysql.sock
- # Disabling symbolic-links is recommended to prevent assorted security risks
- symbolic-links=0
- log-error=/var/log/mysqld.log
- pid-file=/var/run/mysqld/mysqld.pid
- # time zone
- log_timestamps=SYSTEM
- # PASSWORD POLICY
- character-set-server = utf8mb4
- collation-server = utf8mb4_unicode_ci
- init_connect='SET NAMES utf8mb4'
- table_open_cache = 256
- query_cache_size = 2M
- tmp_table_size = 32M
- thread_cache_size = 8
- max_connections=1000
- sql_mode=STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
- # INNODB #
- innodb-flush-method = O_DIRECT
- innodb-log-files-in-group = 2
- innodb-log-file-size = 128M
- innodb-flush-log-at-trx-commit = 2
- innodb-file-per-table = 1
- innodb-buffer-pool-size = 4G
- # SLOW-LOG #
- slow_query_log=ON
- slow_query_log_file=/srv/mysql/mysql-slow.log
- long_query_time=2
- log_queries_not_using_indexes=0
- [client]
- port=3306
- default-character-set=utf8mb4
|