# For advice on how to change settings please see # http://dev.mysql.com/doc/refman/8.0/en/server-configuration-defaults.html [client] socket=/opt/mysqlData/mysql/mysql.sock [mysqld] general_log=on general_log_file=/opt/mysqlData/mysql/centos7-3x86.log log_timestamps=SYSTEM slow_query_log=on init-connect='insert into auditlog.t_audit(id,thread_id,login_time,localname,matchname) values(null,connection_id(),now(),user(),current_user());' lower-case-table-names=1 # # Remove leading # and set to the amount of RAM for the most important data # cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%. innodb_buffer_pool_size = 2048M # # Remove the leading "# " to disable binary logging # Binary logging captures changes between backups and is enabled by # default. It's default setting is log_bin=binlog # disable_log_bin # # Remove leading # to set options mainly useful for reporting servers. # The server defaults are faster for transactions and fast SELECTs. # Adjust sizes as needed, experiment to find the optimal values. join_buffer_size = 128M sort_buffer_size = 2M read_rnd_buffer_size = 2M # # Remove leading # to revert to previous value for default_authentication_plugin, # this will increase compatibility with older clients. For background, see: # https://dev.mysql.com/doc/refman/8.0/en/server-system-variables.html#sysvar_default_authentication_plugin # default-authentication-plugin=mysql_native_password datadir=/opt/mysqlData/mysql socket=/opt/mysqlData/mysql/mysql.sock log-error=/var/log/mysqld.log pid-file=/var/run/mysqld/mysqld.pid #audit_json_file=on #plugin-load=AUDIT=libaudit_plugin.so #audit_record_cmds = 'insert,delete,update,create,drop,alter,grant,truncate' #audit_json_log_file=/opt/mysqlData/log/mysql_audit.json #audit_offset=8600, 8640, 4136, 5616, 496, 0, 0, 32, 64, 160, 584, 8740, 5240, 4248, 4256, 4260, 6896, 1576, 32, 7856, 7896, 7880, 11624, 140, 664, 32 #plugin-load-add=validate_password.so #服务器在启动时加载插件,并防止在服务器运行时删除插件 #validate-password=FORCE_PLUSE_PERMANENT connection-control-min-connection-delay=900000 max_connections=1000 max_user_connections=500 wait_timeout=200 bind-address=172.26.77.250 query_cache_size=1024M query_cache_type=2 max_allowed_packet=256M #在MYSQL暂时停止响应新请求之前 back_log=600 #MySQL允许最大的进程连接数 # max_connections=2000 #指示表调整缓冲区大小 #table_cache=614 #使用–skip-external-locking MySQL选项以避免外部锁定 external-locking=FALSE #设置在网络传输中一次消息传输量的最大值 max_allowed_packet=8M # Sort_Buffer_Size 是一个connection级参数 # sort_buffer_size=2M #用于表间关联缓存的大小 # join_buffer_size=2M # 服务器线程缓存这个值表示可以重新利用保存在缓存中线程的数量 thread_cache_size=300 # 设置thread_concurrency的值的正确与否, 对mysql的性能影响很大 = thread_concurrency应设为CPU核数的2倍 thread_concurrency=16 #批定用于索引的缓冲区大小,增加它可以得到更好的索引处理性能,对于内存在8GB左右的服务器来说,该参数可设置为512MB。 key_buffer_size=1024M #批量插入数据缓存大小,可以有效提高插入效率,默认为8M bulk_insert_buffer_size=64M # 这对Innodb表来说非常重要 # innodb_buffer_pool_size=2048M #文件IO的线程数,一般为 4 innodb_file_io_threads=8
04-22
12-15
11-05
1万+
02-15
4352
09-16
2664
11-24
983
09-09
6061
05-28
1046
07-27
“相关推荐”对你有帮助么?
-
非常没帮助
-
没帮助
-
一般
-
有帮助
-
非常有帮助
提交