My my.ini for my localhost-only Windows machine

mysql
windows

(Dmitry Fedyuk) #1
[client]
port=3306

[mysql]
default-character-set=utf8
host=localhost
no-beep
password=<...>
user=root

[mysqld]
# 2017-04-30 «The path to the MySQL installation directory».
# https://dev.mysql.com/doc/refman/5.7/en/mysql-server.html#option_mysql_server_basedir
# https://dev.mysql.com/doc/refman/5.7/en/server-system-variables.html#sysvar_basedir
# Не знаю, надо ли указывать эту опцию.
# Она присутствовала в моём предыдущем файле настроек, но отсутствует в стандартном файле настроек MySQL 5.7.18
basedir="C:/server/mysql/"
character-set-server=utf8
datadir=I:/server/mysql/data
default-storage-engine=INNODB
# 2017-04-29
# Для устранения предупреждения «TIMESTAMP with implicit DEFAULT value is deprecated»: https://df.tips/t/185
explicit_defaults_for_timestamp = 1
# 2017-04-30 Важно! Чтобы Magento искала по двубуквенным запросам.
ft_min_word_len=2
# 2017-04-30 https://dev.mysql.com/doc/refman/5.7/en/innodb-parameters.html#sysvar_innodb_buffer_pool_size
innodb_buffer_pool_size=4000M
# 2017-04-30 https://dev.mysql.com/doc/refman/5.7/en/innodb-parameters.html#sysvar_innodb_checksum_algorithm
innodb_checksum_algorithm=crc32
# 2017-04-30 https://dev.mysql.com/doc/refman/5.7/en/innodb-parameters.html#sysvar_innodb_fast_shutdown
innodb_fast_shutdown=1
# 2017-04-30 https://dev.mysql.com/doc/refman/5.7/en/innodb-parameters.html#sysvar_innodb_flush_log_at_trx_commit
innodb_flush_log_at_trx_commit=2
# 2017-04-29
# Для устранения предупреждения «Plugin keyring_file reported: 'keyring_file initialization failure. Please check if the keyring_file_data points to readable keyring file or keyring file can be created in the specified location. The keyring_file will stay unusable until correct path to the keyring file gets provided'».
# https://df.tips/t/188
#keyring_file_data="C:/server/mysql/keyring"
# 2017-04-29
# How to fix the «Cannot open datafile for read-only» / «Could not find a valid tablespace file» MySQL error for an intentionally deleted database?
# https://df.tips/t/189
#innodb_force_recovery=4
innodb_log_file_size=125M
key_buffer_size=384M
log_error="C:/server/log/mysql.log"
# 2017-04-30
# https://dev.mysql.com/doc/refman/5.7/en/server-system-variables.html#sysvar_log_error_verbosity
# This variable controls verbosity of the server in writing error, warning, and note messages to the error log.
# The following table shows the permitted values. The default is 3.
# Verbosity Value	Message Types Logged
# 1	Errors only
# 2	Errors and warnings
# 3	Errors, warnings, and notes
log_error_verbosity=2
log-output=NONE
max_allowed_packet=256M
max_connections=700
# 2017-04-30  https://dev.mysql.com/doc/refman/5.7/en/server-system-variables.html#sysvar_myisam_max_sort_file_size
myisam_max_sort_file_size=100G
myisam_sort_buffer_size=214M
port=3306
query_cache_size=200M
read_buffer_size=1M
read_rnd_buffer_size=768K
# 2017-04-29
# https://dev.mysql.com/doc/refman/5.7/en/server-options.html#option_mysqld_secure-file-priv
# https://dev.mysql.com/doc/refman/5.7/en/server-system-variables.html#sysvar_secure_file_priv
# Для устранения предупреждения «[Warning] Insecure configuration for --secure-file-priv: Current value does not restrict location of generated files. Consider setting it to a valid, non-empty path».
# https://df.tips/t/187
secure-file-priv="C:/work"
server-id=1
sort_buffer_size=4M
# 2017-04-30 https://df.tips/t/186
sql-mode="STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION,NO_ZERO_DATE,NO_ZERO_IN_DATE,ERROR_FOR_DIVISION_BY_ZERO"
# 2017-04-30
# How to remove the «SSL context is not usable without certificate and private key» warning for a localhost-only MySQL server?
# https://df.tips/t/191
ssl = 0
# 2017-04-30 https://dev.mysql.com/doc/refman/5.7/en/server-system-variables.html#sysvar_table_definition_cache
table_definition_cache=20000
table_open_cache=20000
thread_cache_size=34
tmp_table_size=112M
# 2017-04-30
# Важно! Чтобы при отладке в xDebug MySQL не обрубал соединение.
# https://dev.mysql.com/doc/refman/5.7/en/server-system-variables.html#sysvar_wait_timeout
wait_timeout=2147483

[mysqld_safe]
open-files-limit=20000

[mysqldump]
default-character-set=utf8
host=localhost
password=<...>
user=root