Mysql from the service configuration file, mysql service configuration file

Source: Internet
Author: User

Mysql from the service configuration file, mysql service configuration file

[Mysql]
Port = 3306
Socket =/var/lib/mysql. sock
Default-character-set = utf8mb4

[Mysqld]
Server-id = 2
Log-bin = mysql-bin

Datadir =/data/mysql
Socket =/var/lib/mysql. sock
# Read-only = 1
Binlog_format = mixed
Slave_skip_errorrs = 1062
Slow_query_log
Slow_query_log_file =/data/mysql/slow. log
Long_query_time = 5
Wait_timeout = 86400
Interactive_timeout = 86400
Max_connections = 1000
Max_user_connection= 1000
Max_connect_errors = 20
Character_set_server = utf8
Skip-external-locking
Key_buffer_size = 512 M
Max_allowed_packet = 512 M
Table_open_cache = 500
Sort_buffer_size = 512 M
Read_buffer_size = 512 M
Read_rnd_buffer_size = 512 M
Myisam_sort_buffer_size = 512 M
Thread_cache_size = 32
Query_cache_size = 512 M

# Binlog-ignore-db = mysql
Binlog-ignore-db = information_schema
# Replicate_ignore_db = mysql
Replicate_ignore_db = information_schema
Expire-logs-days = 10
# Skip-slave-start
Skip-name-resolve
Lower_case_table_names = 1
Log_bin_trust_function_creators = 1

# Innodb_data_home_dir =/data/mysql/data
# Innodb_log_group_home_dir =/data/mysql/logs
Innodb_data_file_path = ibdata1: 20 M: autoextend
Innodb_buffer_pool_size = 48G
Innodb_log_file_size = 512 M
Innodb_log_buffer_size = 512 M
Innodb_lock_wait_timeout = 50
# Innodb_file_per_table
Innodb_flush_log_at_trx_commit = 1
Explicit_defaults_for_timestamp = true
SQL _mode = STRICT_TRANS_TABLES, NO_AUTO_CREATE_USER, NO_ENGINE_SUBSTITUTION, NO_AUTO_VALUE_ON_ZERO


Symbolic-links = 0

# Recommended in standard MySQL setup
# SQL _mode = NO_ENGINE_SUBSTITUTION, STRICT_TRANS_TABLES
Event_scheduler = 1

[Mysqld_safe]
Log-error =/var/log/mysqld. log
Pid-file =/var/run/mysqld. pid

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.