MY.CNF Simple configuration file

Source: Internet
Author: User
[Client]
port=3306
Socket=/tmp/mysql.sock
Default-character-set=utf8


[MySQL]
No-auto-rehash
Default-character-set=utf8


[Mysqld]
port=3306
Character-set-server=utf8
Socket=/tmp/mysql.sock
Basedir=/usr/local/mysql
Datadir=/mydata/data
Explicit_defaults_for_timestamp=true
Lower_case_table_names=1
back_log=103
max_connections=10000
max_connect_errors=100000
table_open_cache=512
External-locking=false
max_allowed_packet=32m
Sort_buffer_size=2m
Join_buffer_size=2m
thread_cache_size=51
query_cache_size=32m
#query_cache_limit =4m
Transaction_isolation=repeatable-read
tmp_table_size=96m
max_heap_table_size=96m






###***slowqueryparameters
Long_query_time=3
Slow_query_log = 1
Slow_query_log_file=/mydata/data/slow.log




# replication
Log-bin=mysql-bin
Server-id=1
binlog_format= ROW
Gtid_mode = On
Enforce_gtid_consistency = 1
Log_slave_updates = 1
Master-info-repository=table
Relay-log-info-repository=table






#***myisamparameters
key_buffer_size=16m
read_buffer_size=1m
read_rnd_buffer_size=16m
bulk_insert_buffer_size=1m




# innodbstorageengineparameters
innodb_buffer_pool_size=4g
Innodb_data_file_path=ibdata1:1g:autoextend
#innodb_file_io_threads =8 #默认的是4
Innodb_buffer_pool_load_at_startup = 1
Innodb_buffer_pool_dump_at_shutdown = 1
Innodb_thread_concurrency=16
Innodb_flush_log_at_trx_commit=1
innodb_log_buffer_size=16m
innodb_log_file_size=256m
innodb_log_files_in_group=2
Innodb_max_dirty_pages_pct=75
#innodb_buffer_pool_dump_pct =75
Innodb_lock_wait_timeout=50
Innodb_file_per_table=1 #独立表空间




[Mysqldump]
Quick
max_allowed_packet=32m




[Mysqld_safe]
open-files-limit=10240
Log-error=/mydata/data/error.log
Pid-file=/mydata/data/mysqld.pid

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.