MySQL configuration file sample

Source: Internet
Author: User

[Client]

port=3306

Socket=/data/dbdata/mysqldata/mysql.sock


[MySQL]

Socket=/data/dbdata/mysqldata/mysql.sock

port=3306

No-auto-rehash

Default-character-set=utf8mb4

Prompt=\\[email protected]\\d\\r:\\m>



[Mysqld]

port=3306

server_id=88888

Socket=/data/dbdata/mysqldata/mysql.sock

Datadir=/data/dbdata/mysqldata

Basedir=/usr/local/mysql

Transaction_isolation=repeatable-read

back_log=500

Event_scheduler=off

Slow_query_log_file=/data/dbdata/mysqllog/slow-query.log

Log_error=/data/dbdata/mysqllog/errlog.err

General_log_file=/data/dbdata/mysqllog/mysql-general.log

Relay-log=/data/dbdata/mysqllog/relay-log/relay-log.bin

Relay_log_recovery=on

Innodb_data_home_dir=/data/dbdata/mysqldata

Innodb_undo_directory=/data/dbdata/mysqldata

Innodb_log_group_home_dir=/data/dbdata/mysqldata

Log_bin=/data/dbdata/mysqllog/binlog/binlog.bin

Skip-character-set-client-handshake=1

Character_set_server=utf8mb4

Collation_server=utf8mb4_general_ci



# #INNODB

Innodb_undo_tablespaces=3

innodb_undo_logs=128

group_concat_max_len=8388608

innodb_additional_mem_pool_size=20m

Innodb_file_per_table=1

innodb_page_size=16384

innodb_buffer_pool_size=62g

Innodb_data_file_path=ibdata1:1g:autoextend

innodb_lock_wait_timeout=120

Innodb_rollback_on_timeout=1

Innodb_print_all_deadlocks=on

Innodb_read_io_threads=8

Innodb_write_io_threads=8

Innodb_adaptive_hash_index=1

Innodb_adaptive_flushing=1

Innodb_adaptive_flushing_lwm=30

Innodb_thread_concurrency=16

Innodb_flush_method=o_direct

Innodb_max_dirty_pages_pct=50

innodb_io_capacity=500

Innodb_support_xa=1

Innodb_buffer_pool_instances=8

innodb_sort_buffer_size=16m

Innodb_file_format=barracuda

Innodb_file_format_max=barracuda

Innodb_file_format_check=1

Innodb_fast_shutdown=1

innodb_purge_threads=2

innodb_flush_log_at_trx_commit=2

innodb_log_buffer_size=64m

innodb_log_file_size=512m

Innodb_log_files_in_group=3

innodb_autoextend_increment=128



# #MyISAM

key_buffer_size=64m

myisam_sort_buffer_size=128m

myisam_max_sort_file_size=10g

concurrent_insert=2


# #OTHER

Sync_binlog=1

Binlog_format=row

binlog_cache_size=256k

Binlog_checksum=crc32

max_binlog_size=512m

Log_bin_trust_function_creators=1

expire_logs_days=10

Slow_query_log=on

Binlog_rows_query_log_events=1

Long_query_time=1

read_buffer_size=4m

read_rnd_buffer_size=4m

bulk_insert_buffer_size=64m

sort_buffer_size=6m

join_buffer_size=4m

Query_cache_type=0

Query_cache_size=0

Query_cache_limit=2m

tmp_table_size=64m

table_open_cache=5120

thread_cache_size=128

open_files_limit=65535

Master-info-repository=table

Relay-log-info-repository=table

Skip_external_locking=1

net_buffer_length=8k

Skip_name_resolve=1

secure_file_priv= "

Log_slave_updates=1


# #MAXLIMIT

max_connections=1000

max_length_for_sort_data=8096

max_heap_table_size=64m

max_allowed_packet=1g

max_connect_errors=99999999

max_heap_table_size=512m

max_length_for_sort_data=16k

Max_slowlog_files =3

Max_slowlog_size =1073741824



# #TIMEOUT

wait_timeout=28800

interactive_timeout=28800



[Mysqldump]

max_allowed_packet=512m

Default-character-set=utf8mb4


MySQL configuration file sample

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.