The my.cnf of a MySQL master

Source: Internet
Author: User

[Mysqld]

Port= 3306

Socket=/tmp/mysql.sock

Datadir=/data/mysql/data

Server-id= 1


Skip-name-resolve

Expire_logs_days=15


Log-bin=mysql-bin

Binlog_format=mixed


Replicate-do-db=allin_platform

Replicate-do-db=allin_platform_log


Slow_query_log = On

Long_query_time = 2

Slow_query_log_file=/data/mysql/data/mysql-master-slow.log


#explicit_defaults_for_timestamp =true

Query_cache_type=1


Key_buffer_size = 512M

Max_allowed_packet = 8M

#table_open_cache = 2000

Sort_buffer_size = 16M

#net_buffer_length = 8K

Read_buffer_size = 32M

#read_rnd_buffer_size = 256K

Myisam_sort_buffer_size = 16M

Default-storage-engine=innodb

max_connections=500

innodb_log_buffer_size=16m

innodb_buffer_pool_size=2048m

Character_set_server=utf8

Innodb_sort_buffer_size = 8M


#innodb_buffer_pool_instances = 8

#innodb_flush_log_at_trx_commit = 1

Innodb_file_per_table = OFF


#open_files_limit = 10000

Query_cache_limit = 4M

Query_cache_size = 512M


[Client]

Port = 3306

Socket =/tmp/mysql.sock


[Mysqldump]

Quick

Max_allowed_packet = 16M


[MySQL]

No-auto-rehash


[Myisamchk]

Key_buffer_size = 20M

Sort_buffer_size = 20M

Read_buffer = 2M

Write_buffer = 2M


[Mysqlhotcopy]

Interactive-timeout


The my.cnf of a MySQL master

Related Article

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.