my.conf 如下 [mysqld]
character_set_server = utf8mb4
datadir = /var/lib/mysql
expire_logs_days = 1
explicit_defaults_for_timestamp = 1
general_log = ON
general_log_file = /var/log/mysql/general_log_file.log
innodb_buffer_pool_size = 1G
innodb_flush_log_at_trx_commit = 2
innodb_flush_method = O_DIRECT
innodb_flush_neighbors = 0
innodb_io_capacity = 1000
innodb_io_capacity_max = 2000
innodb_large_prefix = 1
innodb_lock_wait_timeout = 30
innodb_print_all_deadlocks = 1
innodb_thread_concurrency = 4
join_buffer_size = 1M
log-error = /var/log/mysql/error.log
log_queries_not_using_indexes = 0
log_slow_admin_statements = 1
log_slow_slave_statements = 1
log_timestamps = system
long_query_time = 10
max_connect_errors = 10
pid-file = /var/run/mysqld/mysqld.pid
read_rnd_buffer_size = 8388608
slow_query_log = 1
slow_query_log_file = /var/log/mysql/slow_query_log_file.log
socket = /var/run/mysqld/mysqld.sock
sort_buffer_size = 4194304
tmp_table_size = 67108864
wait_timeout = 600
binlog-ignore-db = mysql
enforce-gtid-consistency = ON
gtid-mode = ON
log-bin = mysql-bin
log-slave-updates = ON
innodb_log_file_size = 256M
lower_case_table_names = 1
max_connections = 512
server-id = 1
sql-mode =
STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。
V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。
V2EX is a community of developers, designers and creative people.