Home > database >  My MySQL configuration file. The CNF explanation
My MySQL configuration file. The CNF explanation

Time:11-13

[client]
Port=6306 # customer connection
Socket=/data/mysql. The sock # socket file
# default - character - set=utf8

[mysql]
# tee=/data/mysql/query log
Prompt="[\ u @ \ h] [\ d] & gt; \ _ "# can customize the tooltip
Connect_timeout=5 # connection timeout
No - auto - rehash # auto-complete
# default - character - set=utf8

[mysqld]
# start
User=# mysql default start mysql user
Port=6306 # service port
Socket=/data/mysql. The sock # socket file
Character - set - server=utf8mb4 # character set
Basedir=/usr/local/mysql 5.7 # the installation directory
Datadir=/data/mydata # data directory
Open_files_limit=65535 # largest open file limit
Back_log=1024 # how many records in a suspend request time within the stack
Max_connections=2000 # maximum number of connections
Max_connect_errors=100000 # # biggest mistake connections
External - locking=FALSE # skip the external locking
Max_allowed_packet=128 m # insert and update the size of the largest
Explicit_defaults_for_timestamp=1 # timestamp automatically update
Default_authentication_plugin=mysql_native_password # default "mysql_native_password plug-in authentication
"Skip_name_resolve=1 # prohibited DNS

# log_timestamps=system log is the system time
Character - set - the client - handshake=FALSE # client into other character set invalid
Character - set - server=utf8mb4 # service character set
Collation arrangement - server=utf8mb4 # character set
# _unicode_ciinit_connect='SET NAMES utf8mb4'
# default - character - set=utf8mb4
Character - set - the client - handshake=FALSE # banned the client into other character set
='SET NAMES init_connect utf8mb4' initial character SET #
Secure_file_priv=#/data select * into the export file directory
# buffers & amp; Cache
Table_open_cache=2048
Table_definition_cache=2048
Max_heap_table_size=96 m
Sort_buffer_size=2 m
Join_buffer_size=2 m
Thread_cache_size=256
Query_cache_size=0
Query_cache_type=0
Query_cache_limit=256 k
Query_cache_min_res_unit=512
Thread_stack=192 k
Both tmp_table_size=96 m
Key_buffer_size=32 m
Read_buffer_size=8 m
Read_rnd_buffer_size=16 m
Bulk_insert_buffer_size=32 m

# slave - skip - errors=1032105 3106 2 # skip copy error code


# binlog
Binlog_format=row # binlog format
Server - id=5463245 # service id
The log - bin=/data/my_7301/logs/mysql - bin # binlog directory
The log - bin - index=/data/my_7301/logs/mysql - bin. The index # binlog index file
Binlog_cache_size=4 m # binlog cache size
Max_binlog_size=1 g # binlog biggest
Max_binlog_cache_size=2 g # binlog buffer biggest
# sync_binlog=1
Expire_logs_days=2 # log expiration time
# replicate - wild - ignore - table=mysql. %
Replicate - wild - ignore - table=test. %
Replicate - wild - ignore - table=information_schema. %
# replicate - wild - ignore - table=iot_view_test_uat. %

# relay log
Skip_slave_start=1
Max_relay_log_size=1 g
Relay_log_purge=1
Relay_log_recovery=1
Log_slave_updates
# slave - skip - errors=1032106

Slow_query_log=1
Slow_query_log_file=/data/my_7301/logs/missile. The log
Log - error=/data/my_7301/logs/error log
Long_query_time=0.5

# the timeout
Interactive_timeout=300
Wait_timeout=300

# innodb engine
Innodb_buffer_pool_size=1 g
Innodb_buffer_pool_instances=2
Innodb_data_file_path=ibdata1:1 g: autoextend
Innodb_flush_log_at_trx_commit=2
Innodb_log_buffer_size=64 m
Innodb_log_file_size=500 m
Innodb_log_files_in_group=3
Innodb_max_dirty_pages_pct=50
Innodb_file_per_table=1
Innodb_rollback_on_timeout=1
Innodb_status_file=1
Innodb_io_capacity=2000
Innodb_io_capacity_max=4000
Innodb_flush_neighbors=0
Innodb_write_io_threads=8
Innodb_read_io_threads=8
Innodb_purge_threads=4
Innodb_page_cleaners=4
Innodb_lru_scan_depth=4000
Innodb_checksum_algorithm=crc32
Innodb_lock_wait_timeout=10
Innodb_print_all_deadlocks=1
Innodb_online_alter_log_max_size=1 g
Internal_tmp_disk_storage_engine=InnoDB
Innodb_stats_on_metadata=https://bbs.csdn.net/topics/0
Innodb_status_file=1
Innodb_status_output_locks=0


Performance_schema=1

# innodb monitor
Innodb_monitor_enable="module_innodb"
Innodb_monitor_enable="module_server"
Innodb_monitor_enable="module_dml"
Innodb_monitor_enable="module_ddl"
Innodb_monitor_enable="module_trx"
Innodb_monitor_enable="module_os"
Innodb_monitor_enable="module_purge"
Innodb_monitor_enable="module_log"
Innodb_monitor_enable="module_lock"
Innodb_monitor_enable="module_buffer"
Innodb_monitor_enable="module_index"
Innodb_monitor_enable="module_ibuf_system"
Innodb_monitor_enable="module_buffer_page"
Innodb_monitor_enable="module_adaptive_hash"


Transaction_isolation=READ - COMMITTED
Innodb_flush_method=O_DIRECT
Gtid_mode=ON
Enforce_gtid_consistency=ON
Master_info_repository=TABLE
Relay - log - info - repository=TABLE
Binlog_checksum=NONE
Log_slave_updates=ON
Binlog_row_image=FULL
Innodb_thread_concurrency=0
nullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnull
  • Related