MySQL 5.6常用参数配置及说明
[client]
user = root
password = Yong_110 [mysql]
prompt = [\\u@\\p][\\d]>\\_
no-auto-rehash [mysqld_safe]
##默认的内存分配就是c的malloc,建议使用tcmalloc或者jemalloc,优化内存分配
malloc-lib=/usr/lib64/libjemalloc.so [mysqldump]
##证在备份过程中整个备份集的数据一致性
single-transaction [mysqld]
# basic settings
user = mysql
server-id =
port =
sql_mode = "STRICT_TRANS_TABLES,NO_ENGINE_SUBSTITUTION,NO_ZERO_DATE,NO_ZERO_IN_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER"
autocommit =
##指定字符集
character_set_server=utf8mb4
##指定MySQLserver常用路径
basedir =/usr/local/mysql
datadir=/ydata/my57//data
tmpdir = /ydata/my57//data/tmp
socket = /ydata/my57//run/mysql.sock
pid-file=/ydata/my57//run/mysql.pid
##指定事物隔离级别,默认REPEATABLE-READ
transaction_isolation = READ-COMMITTED
##设置为on表示timestamp列的值都要显示指定
explicit_defaults_for_timestamp =
##最大为1G,默认1M(<=5.6.)或者4M(>=5.6.),建议调整,避免Packet too large 或者MySQL gone away错误发生
max_allowed_packet = 64M
event_scheduler =
skip-name-resolve
# metalock performance settings
metadata_locks_hash_instances =
# password plugin
validate_password_policy = STRONG
validate-password = FORCE_PLUS_PERMANENT # connection settings
##服务器关闭交互式连接前等待活动的秒数,默认28800秒(8小时)
interactive_timeout =
##服务器关闭非交互连接之前等待活动的秒数,默认28800秒(8小时)
wait_timeout =
##锁等待的时间,默认50s
lock_wait_timeout =
skip_name_resolve =
##External-locking用于多进程条件下为MyISAM数据表进行锁定
skip-external-locking
max_connections =
max_user_connections =
max_connect_errors = # table cache settings
table_open_cache =
table_definition_cache =
table_open_cache_instances = # session memory settings
read_buffer_size = 16M
read_rnd_buffer_size = 32M
sort_buffer_size = 32M
tmp_table_size = 64M
join_buffer_size = 128M
thread_cache_size = # binlog settings
sync_binlog =
binlog_format = ROW
binlog_rows_query_log_events =
log_bin=/ydata/my57//dblogs/binlog/binlog
gtid_mode = on
enforce_gtid_consistency =
sync_master_info = #replication settings
master_info_repository = TABLE
relay_log_info_repository = TABLE
log_slave_updates
relay_log = /ydata/my57//dblogs/relaylog/relay.log
max-relay-log-size=512M
relay_log_recovery =
slave_skip_errors = ddl_exist_errors
slave_rows_search_algorithms = 'INDEX_SCAN,HASH_SCAN'
sync_relay_log =
sync_relay_log_info = # semi sync replication settings
plugin-load = "group_replication.so;validate_password.so;semisync_master.so;semisync_slave.so"
loose_rpl_semi_sync_master_enabled =
loose_rpl_semi_sync_master_timeout =
loose_rpl_semi_sync_slave_enabled = # log settings #
log_error = /ydata/my57//logs/alter.log
log_error_verbosity =
general_log=
general_log_file = /ydata/my57//logs/general.log
slow_query_log =
long_query_time =
slow_query_log_file = /ydata/my57//logs/slow.log
log_queries_not_using_indexes =
log_slow_admin_statements =
log_slow_slave_statements =
log_throttle_queries_not_using_indexes =
expire_logs_days =
min_examined_row_limit =
log-bin-trust-function-creators =
log-slave-updates = ###innodb base settings
innodb_page_size =
innodb_data_home_dir =/ydata/my57//data
innodb_lock_wait_timeout =
innodb_stats_persistent_sample_pages =
innodb_autoinc_lock_mode =
innodb_large_prefix =
innodb_thread_concurrency =
innodb_print_all_deadlocks =
innodb_strict_mode = ##innodb memory
innodb_buffer_pool_size = 160G
innodb_sort_buffer_size = 64M
innodb_buffer_pool_instances =
innodb_buffer_pool_load_at_startup =
innodb_buffer_pool_dump_at_shutdown =
innodb_online_alter_log_max_size=1G ##innodb io setting
innodb_write_io_threads =
innodb_read_io_threads =
innodb_purge_threads =
innodb_file_per_table =
innodb_open_files=
innodb_io_capacity =
innodb_io_capacity_max =
innodb_flush_method = O_DIRECT
innodb_lru_scan_depth =
innodb_flush_neighbors = # innodb redo/undo settings #
innodb_log_buffer_size = 64M
innodb_log_group_home_dir = /ydata/my57//dblogs/redolog
innodb_data_file_path = ibdata1:100M:autoextend
innodb_undo_logs =
innodb_undo_tablespaces =
innodb_log_file_size = 1G
innodb_log_files_in_group = # perforamnce_schema settings
performance-schema-instrument='memory/%=COUNTED'
performance_schema_digests_size =
performance_schema_max_table_instances =
performance_schema_max_sql_text_length =
performance_schema_max_digest_length =
MySQL 5.6常用参数配置及说明的更多相关文章
- Production环境中iptables常用参数配置
production环境中iptables常用参数配置 作者:尹正杰 版权声明:原创作品,谢绝转载!否则将追究法律责任. 我相信在实际生产环境中有很多运维的兄弟跟我一样,很少用到iptables的这个 ...
- Weblogic内存溢出及常用参数配置
http://www.360doc.com/content/14/0306/14/16134804_358216319.shtml 一.WebLogic内存溢出 最近访问量门户访问量突然增大, ...
- 数据库相关文章转载(1) MySQL性能优化之参数配置
1.目的: 通过根据服务器目前状况,修改Mysql的系统参数,达到合理利用服务器现有资源,最大合理的提高MySQL性能. 2.服务器参数: 32G内存.4个CPU,每个CPU 8核. 3.MySQL目 ...
- MySQL性能优化之参数配置
1.目的: 通过根据服务器目前状况,修改Mysql的系统参数,达到合理利用服务器现有资源,最大合理的提高MySQL性能. 2.服务器参数: 32G内存.4个CPU,每个CPU 8核. 3.MySQL目 ...
- MySQL 关于性能的参数配置梳理
以下List是我们常见的MySQL参数配置,这个参数对提高实例的性能大有裨益. 其中 建议设置值,仅供参考,需要根据自己的业务场景和硬件资源仔细推敲. 参数 设置说明 建议设置值 lower_case ...
- [Hive_add_8] Hive 常用参数配置
0. 说明 记录 Hive 常用参数的配置 1. 设置本地模式 让 Hive 自动使用 Hadoop 的本地模式运行作业,提升处理性能 适合小文件,一般用于测试 set hive.exec.mode. ...
- Mysql性能优化之参数配置(转)
前言: Mysql作为数据库中广泛应用的开源产品,需要面对不同的生产压力,而有些性能问题通过配置优化就可以得到解决,优化可以分为几个方向:1.优化参数配置.2.优化数据库索引.3.优化数据库结构,如分 ...
- logback 常用参数配置详解
logback 常用配置详解(二) <appender> <appender>: <appender>是<configuration>的子节点,是负责写 ...
- MySQL性能优化-内存参数配置
Mysql对于内存的使用,可以分为两类,一类是我们无法通过配置参数来配置的,如Mysql服务器运行.解析.查询以及内部管理所消耗的内存:另一类如缓冲池所用的内存等. Mysql内存参数的配置及重要,设 ...
随机推荐
- HDU1863-畅通工程
题目链接:点击打开链接 Problem Description 省政府"畅通工程"的目标是使全省任何两个村庄间都可以实现公路交通(但不一定有直接的公路相连,只要能间接通过公路可达即 ...
- javascript 返回上一页面:onclick="javascript:history.back(-1);"
<a href="<a href="javascript :history.back(-1)">返回上一页</a>或<a href=& ...
- 【ACM】大数阶乘 - Java BigInteger实现
大数阶乘 时间限制:3000 ms | 内存限制:65535 KB 难度:3 描述 我们都知道如何计算一个数的阶乘,可是,如果这个数很大呢,我们该如何去计算它并输出它? 输入 输入一个整数 ...
- Abp 修改默认的日期时间格式
abp默认是不使用mvc的时间格式,所以直接在AddMvc修改DateFormatString是不会生效的.需要先启用mvc时间格式.Configuration.Modules.AbpAspNetCo ...
- python多继承(新式类)一
最近在学习python的多重继承. 先来了解下多重继承的概念,所谓多重继承,是指python的类可以有两个以上父类,也即有类A,类B,类C,C同时继承类A与类B,此时C中可以使用A与B中的属性与方法. ...
- sed 处理一行,替换 删除
sed option 'action' filename (文件可多个) option: -i 直接在原文件中修改! -n 安静模式,默认情况所有数据都会被列出,但-n只有经过动作处理的那一行才被列出 ...
- Xpath定位绝密版本
xpath的作用就是两个字“定位”, 运用各种方法进行快速准确的定位,推荐两个非常有用的的firefox工具:firebug和xpath checker 在 XPath 中, 有七种类型的节点:元素. ...
- JAVA基础系列(一) 概述与相关概念
万事开头难,来这个平台上已经有一段时间了,看到了很多高质量的文章,也很喜欢这种简约的风格.一直也想把自己的零散的知识体系组织起来,但苦于自己拙劣的文笔和不成流派的风格让大家笑话,直到现在才开始.可是从 ...
- The program 'unzip' is currently not installed. You can install it by typing:
linux解压遇到下面问题: The program 'unzip' is currently not installed. You can install it by typing: sudo ap ...
- tomcat7 开机自启动(转)
转自 http://blog.csdn.net/rainyspring4540/article/details/51861079 环境:win7 tomcat7 开机自启动: 使用管理员打开命令提示 ...