[client]
port = 3306
default-character-set=utf8mb4
socket = /var/run/mysqld/mysql.sock
# user=david
# password=00000000

[mysqld]
########basic settings########
server-id = 8
port = 3306
binlog-ignore-db=mysql
# user = mysql
# bind_address = 101.116.221.2
autocommit = 1
character_set_server=utf8mb4
skip_name_resolve = 1
max_connections = 800
max_connect_errors = 1000
datadir = /mysql_data
# transaction_isolation = READ-COMMITTED
explicit_defaults_for_timestamp = 1
join_buffer_size = 128M
tmp_table_size = 128M
# tmpdir = F:\mysql\tmp
max_allowed_packet = 16M
sql_mode = "STRICT_TRANS_TABLES,NO_ENGINE_SUBSTITUTION,NO_ZERO_DATE,NO_ZERO_IN_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER"
interactive_timeout = 120
wait_timeout = 120
key_buffer_size = 512M
read_buffer_size = 16777216
read_rnd_buffer_size = 33554432
sort_buffer_size = 33554432

thread_cache_size = 300
# 5.7版本移除
# thread_concurrency = 8
query_cache_size = 512M
query_cache_limit =16M
query_cache_min_res_unit = 2k
bulk_insert_buffer_size = 128M

#############timeout########
connect_timeout=30
# delayed_insert_timeout=300
# net_read_timeout=120
# net_write_timeout=120
# slave_net_timeout=3600

########log settings########
log_bin_trust_function_creators = 1
log_error = error.log
slow_query_log = 1
slow_query_log_file = slow.log
log_queries_not_using_indexes = 1
log_slow_admin_statements = 1
log_slow_slave_statements = 1
log_throttle_queries_not_using_indexes = 10
expire_logs_days = 90
long_query_time = 2
min_examined_row_limit = 100
########replication settings########
master_info_repository = TABLE
relay_log_info_repository = TABLE
log_bin = bin.log
sync_binlog = 1
gtid_mode = on
enforce_gtid_consistency = 1
log_slave_updates = 1
binlog_format = mixed
relay_log = relay.log
relay_log_recovery = 1
binlog_gtid_simple_recovery = 1
slave_skip_errors = ddl_exist_errors
########innodb settings########
innodb_page_size = 16384
innodb_buffer_pool_size = 6G
innodb_buffer_pool_instances = 8
# innodb_buffer_pool_load_at_startup = 1
# innodb_buffer_pool_dump_at_shutdown = 1
innodb_lru_scan_depth = 2000
innodb_lock_wait_timeout = 120
# innodb_io_capacity = 4000
# innodb_io_capacity_max = 8000
# innodb_flush_method = O_DIRECT
innodb_file_format = Barracuda
innodb_file_format_max = Barracuda
# innodb_log_group_home_dir = /redolog/
# innodb_undo_directory = /undolog/
innodb_undo_logs = 128
# innodb_undo_tablespaces = 3
innodb_flush_neighbors = 1
innodb_log_file_size = 4G
innodb_log_buffer_size = 16777216
innodb_purge_threads = 4
innodb_large_prefix = 1
innodb_thread_concurrency = 64
innodb_print_all_deadlocks = 1
innodb_strict_mode = 1
innodb_sort_buffer_size = 67108864
########semi sync replication settings########
# plugin_dir=/usr/local/mysql/lib/plugin
# plugin_load = "rpl_semi_sync_master=semisync_master.so;rpl_semi_sync_slave=semisync_slave.so"
# loose_rpl_semi_sync_master_enabled = 1
# loose_rpl_semi_sync_slave_enabled = 1
# loose_rpl_semi_sync_master_timeout = 5000

[mysqld-5.7]
innodb_buffer_pool_dump_pct = 40
innodb_page_cleaners = 4
innodb_undo_log_truncate = 1
innodb_max_undo_log_size = 2G
innodb_purge_rseg_truncate_frequency = 128
binlog_gtid_simple_recovery=1
log_timestamps=system
transaction_write_set_extraction=MURMUR32
show_compatibility_56=on
secure_file_priv=/tmp/
group_concat_max_len = 102400

mysql的my.cnf配置文件的更多相关文章

  1. MySQL数据库my.cnf配置文件注释详解

    我们知道,在MySQL数据库安装完成后,要对my.cnf配置文件进行适当的修改才能充分利用MySQL数据库的功能.但是对于初学者来说,修改my.cnf配置文件似乎是一个比较难的过程.为了解决这个问题, ...

  2. MySQL my.cnf 配置文件注释

    以下是my.cnf配置文件参数解释 [client] port                     = 3309socket                   = /home/longxiben ...

  3. MySQL入门篇(三)之my.cnf配置文件详解【转】

    转自:https://www.cnblogs.com/panwenbin-logs/p/8360703.html #*** client options 相关选项 ***# #以下选项会被MySQL客 ...

  4. 【mysql案例】mysql5.6.14配置my.cnf多实例,mysql_install_db初始化不读取my.cnf配置文件

    1.1.1. mysql5.6.14多实例my.cnf时,初始化不读取my.cnf配置文件 [环境描写叙述] 在多实例配置的/etc/my.cnf环境中,运行mysql_install_db后.启动M ...

  5. MySQL读取各个my.cnf配置文件的先后顺序是:

    /etc/my.cnf /etc/mysql/my.cnf /usr/local/mysql/etc/my.cnf ~/.my.cnf 其他自定义路径下的my.cnf,例如:/data/mysql/y ...

  6. Centos 7 上 查看MySQL当前使用的配置文件my.cnf的方法

    my.cnf是mysql启动时加载的配置文件,一般会放在mysql的安装目录中,用户也可以放在其他目录加载.总的来说,my.cnf类似与window中my.ini 使用locate my.cnf命令可 ...

  7. MYSQL服务器my.cnf配置文档详解

    MYSQL服务器my.cnf配置文档详解 硬件:内存16G [client] port = 3306 socket = /data/3306/mysql.sock [mysql] no-auto-re ...

  8. MySQL数据库my.cnf性能参数如何调优

    提供一个MySQL 5.6版本适合在1GB内存VPS上的my.cnf配置文件.配置文件可以到这里下载:: 下载my.cnf [client] port = 3306 socket = /tmp/mys ...

  9. mysql 在启动时配置文件的查找方式

    知识储备: 1.mysql在启动时会去多个地方找它的配置文件,当然啦这些也都是可以从帮助中找到的,问题在于我们要知道怎么找到对应的帮助才行啊 实战: [root@workstudio data]# m ...

随机推荐

  1. 20145234黄斐《Java程序设计》第七周学习总结(课本部分)

    教材知识概述 存储器系统是一个具有不同容量.成本和访问时间的存储设备的层次结构. 6.1 存储技术 1.随机访问存储器(RAM)分为两类:静态的(SRAM)比动态的(DRAM)快,但也贵得多 静态RA ...

  2. 使用GeoServer发布shp数据为WMS服务和WFS服务

    使用GeoServer发布shp数据为WMS服务和WFS服务 1安装GeoServer 2使用GeoServer上传数据 3使用GeoServer发布数据为WMS和WFS 看完本教程,你将学会安装Ge ...

  3. 成都Uber优步司机奖励政策(3月15日)

    滴快车单单2.5倍,注册地址:http://www.udache.com/ 如何注册Uber司机(全国版最新最详细注册流程)/月入2万/不用抢单:http://www.cnblogs.com/mfry ...

  4. Java语言简介

    Java即计算机编程语言 1.概念 Java是一门面向对象编程语言,不仅吸收了C++语言的各种优点,还摒弃了C++里难以理解的多继承.指针等概念,因此Java语言具有功能强大和简单易用两个特征.Jav ...

  5. Windows 显示环境变量

    echo %% D:\>echo %python3% C:\Users\zy\AppData\Local\Programs\Python\Python36 D:\> 我的环境变量如下:

  6. verilog入门语法学习-第1篇

    1. 如何观察被测模块的响应: 在initial 块中,用系统任务$time 和 $monitor $time 返回当前的仿真时刻 $monitor 只要在其变量列表中有某一个或某几个变 量值发生变化 ...

  7. 安装MySQLdb模块遭遇"fatal error: my_config.h: No such file or directory"的处理

    Issue       I encountered an error when I run the python script which need to import the module of & ...

  8. Appium-原理、设置

    Appium是支持跨平台的移动端自动化测试框架. 下面介绍下Appium的具体工作流程: 首先,Appium server 默认监听4723端口,监听客户端的命令. 客户端指的是 我们编写的自动化测试 ...

  9. CodeForces - 1059D(二分+误差)

    链接:CodeForces - 1059D 题意:给出笛卡尔坐标系上 n 个点,求与 x 轴相切且覆盖了所有给出点的圆的最小半径. 题解:二分半径即可.判断:假设当前二分到的半径是 R ,因为要和 x ...

  10. Python replace方法并不改变原字符串

    直接给出结论:replace方法不会改变原字符串. temp_str = 'this is a test' print(temp_str.replace('is','IS') print(temp_s ...