What are the necessary configurations for my.cnf configuration files
Editor to share with you what the necessary configuration of the my.cnf configuration file, I believe most people do not know much, so share this article for your reference, I hope you can learn a lot after reading this article, let's go to know it!
# binary file
Log-bin=mysql-bin
# Mark id for replication
Server-id=103
# character setting
Character_set_server = utf8
# remote connection
Federated
# sign of things
Event_scheduler = on
# # maximum number of connections
Max_connections=1000
# enable slow query
Slow-query-log = on
# # Storage path and name of slow query logs
Slow_query_log_file = / var/log/slow-query.log
# # query statements with query time longer than 5 seconds
Long_query_time = 5
# cache pool caches innodb table data and indexes, and inserts data buffers
Innodb_buffer_pool_size=12G
# data storage form of independent tablespaces, where data and indexes are stored separately (databases with larger data are suitable)
Innodb_file_per_table=1
# increase the data of cpu concurrency iCompact 0
Innodb_read_io_threads = 6
Innodb_write_io_threads = 10
Max_allowed_packet=20M
# incorrect connection test
Max_connect_errors = 10000
[mysqld_safe]
Log-error=/var/log/mysqld.log
Pid-file=/var/run/mysqld/mysqld.pid
The above is all the contents of the article "what are the necessary configurations for my.cnf configuration files?" Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!