#
# The MySQL database server configuration file.
#
# You can copy this to one of:
# - "/etc/mysql/my.cnf" to set global options,
# - "~/.my.cnf" to set user-specific options.
#
# One can use all long options that the program supports.
# Run program with --help to get a list of available options and with
# --print-defaults to see which it would actually understand and use.
#
# For explanations see
# http://dev.mysql.com/doc/mysql/en/server-system-variables.html
# This will be passed to all mysql clients
# It has been reported that passwords should be enclosed with ticks/quotes
# escpecially if they contain "#" chars...
# Remember to edit /etc/mysql/debian.cnf when changing the socket location.
[client]
port = 3306
socket = /tmp/mysql.sock
loose-default-character-set=utf8
#default-character-set = utf8
# Here is entries for some specific programs
# The following values assume you have at least 32M ram
# This was formally known as [safe_mysqld]. Both versions are currently parsed.
[mysqld_safe]
socket = /tmp/mysql.sock
nice = 0
[mysqld]
#
# * Basic Settings
#
#
# * IMPORTANT
# If you make changes to these settings and your system uses apparmor, you may
# also need to also adjust /etc/apparmor.d/usr.sbin.mysqld.
#
character-set-server = utf8
user = mysql
socket = /tmp/mysql.sock
port = 3306
basedir = /usr/local/mysql
datadir = /data1/mysql
tmpdir = /tmp
skip-external-locking
#
# Instead of skip-networking the default is now to listen only on
# localhost which is more compatible and is not less secure.
bind-address = 0.0.0.0
wait_timeout = 31536000
interactive_timeout = 31536000
skip-name-resolve
back_log = 500
max_connections = 500
max_connect_errors = 10
#external-locking
table_cache = 512
max_allowed_packet = 16M
binlog_cache_size = 128M
max_heap_table_size = 64M
sort_buffer_size = 512M
join_buffer_size = 512M
thread_cache_size = 8
thread_concurrency = 16
query_cache_size =128M
query_cache_limit = 512M
ft_min_word_len = 4
#memlock
default_table_type = innodb
thread_stack = 192K
transaction_isolation = READ-COMMITTED
tmp_table_size = 256M
#log
log_warnings
log_error = /var/log/mysql/error.log
log-short-format
slow_query_log = 1
slow_query_log_file = /data1/logs/mysql-slow.log
long_query_time = 0.5
log-queries-not-using-indexes
tmpdir = /tmp
#*** MyISAM Specific options
key_buffer_size = 512M
read_buffer_size = 512M
read_rnd_buffer_size = 512M
bulk_insert_buffer_size = 128M
myisam_sort_buffer_size = 128M
myisam_max_sort_file_size = 10G
myisam_repair_threads = 1
myisam_recover
# Here you can see queries with especially long duration
#
# The following can be used as easy to replay backup logs or for replication.
# note: if you are setting up a replication slave, see README.Debian about
# other settings you may need to change.
server-id = 2
log_bin = mysql-bin.log
binlog_format = mixed
#master-host=192.168.172.3
#master-user=replication
#master-password=123456
#master-port=3306
slave-skip-errors=all
#slave-skip-errors=1062,1053,1452
expire_logs_days = 10
max_binlog_size = 100M
# *** INNODB Specific options ***
#skip-innodb
innodb_additional_mem_pool_size = 64M
innodb_buffer_pool_size = 1024m
innodb_autoextend_increment = 256m
innodb_data_file_path = ibdata1:1000M:autoextend
innodb_read_io_threads = 8
innodb_write_io_threads = 4
#innodb_force_recovery = 1
innodb_thread_concurrency = 8
innodb_flush_log_at_trx_commit = 0
#innodb_fast_shutdown
innodb_log_buffer_size = 128M
innodb_log_file_size = 256M
innodb_log_files_in_group = 3
#innodb_log_group_home_dir
innodb_max_dirty_pages_pct = 90
innodb_flush_method = O_DSYNC
innodb_lock_wait_timeout = 120
innodb_support_xa = 0
# *** Percona Patches options ***
# http://www.percona.com/docs/wiki/patches:start
#innodb_show_verbose_locks
#innodb_show_locks_held
#userstat_running
[mysqldump]
quick
quote-names
max_allowed_packet = 16M
[mysql]
#no-auto-rehash # faster start of mysql but no tab completition
[isamchk]
key_buffer = 16M
- 浏览: 2652684 次
- 来自: 杭州
文章分类
- 全部博客 (1188)
- webwork (4)
- 网摘 (18)
- java (103)
- hibernate (1)
- Linux (85)
- 职业发展 (1)
- activeMQ (2)
- netty (14)
- svn (1)
- webx3 (12)
- mysql (81)
- css (1)
- HTML (6)
- apache (3)
- 测试 (2)
- javascript (1)
- 储存 (1)
- jvm (5)
- code (13)
- 多线程 (12)
- Spring (18)
- webxs (2)
- python (119)
- duitang (0)
- mongo (3)
- nosql (4)
- tomcat (4)
- memcached (20)
- 算法 (28)
- django (28)
- shell (1)
- 工作总结 (5)
- solr (42)
- beansdb (6)
- nginx (3)
- 性能 (30)
- 数据推荐 (1)
- maven (8)
- tonado (1)
- uwsgi (5)
- hessian (4)
- ibatis (3)
- Security (2)
- HTPP (1)
- gevent (6)
- 读书笔记 (1)
- Maxent (2)
- mogo (0)
- thread (3)
- 架构 (5)
- NIO (5)
- 正则 (1)
- lucene (5)
- feed (4)
- redis (17)
- TCP (6)
- test (0)
- python,code (1)
- PIL (3)
- guava (2)
- jython (4)
- httpclient (2)
- cache (3)
- signal (1)
- dubbo (7)
- HTTP (4)
- json (3)
- java socket (1)
- io (2)
- socket (22)
- hash (2)
- Cassandra (1)
- 分布式文件系统 (5)
- Dynamo (2)
- gc (8)
- scp (1)
- rsync (1)
- mecached (0)
- mongoDB (29)
- Thrift (1)
- scribe (2)
- 服务化 (3)
- 问题 (83)
- mat (1)
- classloader (2)
- javaBean (1)
- 文档集合 (27)
- 消息队列 (3)
- nginx,文档集合 (1)
- dboss (12)
- libevent (1)
- 读书 (0)
- 数学 (3)
- 流程 (0)
- HBase (34)
- 自动化测试 (1)
- ubuntu (2)
- 并发 (1)
- sping (1)
- 图形 (1)
- freemarker (1)
- jdbc (3)
- dbcp (0)
- sharding (1)
- 性能测试 (1)
- 设计模式 (2)
- unicode (1)
- OceanBase (3)
- jmagick (1)
- gunicorn (1)
- url (1)
- form (1)
- 安全 (2)
- nlp (8)
- libmemcached (1)
- 规则引擎 (1)
- awk (2)
- 服务器 (1)
- snmpd (1)
- btrace (1)
- 代码 (1)
- cygwin (1)
- mahout (3)
- 电子书 (1)
- 机器学习 (5)
- 数据挖掘 (1)
- nltk (6)
- pool (1)
- log4j (2)
- 总结 (11)
- c++ (1)
- java源代码 (1)
- ocr (1)
- 基础算法 (3)
- SA (1)
- 笔记 (1)
- ml (4)
- zokeeper (0)
- jms (1)
- zookeeper (5)
- zkclient (1)
- hadoop (13)
- mq (2)
- git (9)
- 问题,io (1)
- storm (11)
- zk (1)
- 性能优化 (2)
- example (1)
- tmux (1)
- 环境 (2)
- kyro (1)
- 日志系统 (3)
- hdfs (2)
- python_socket (2)
- date (2)
- elasticsearch (1)
- jetty (1)
- 树 (1)
- 汽车 (1)
- mdrill (1)
- 车 (1)
- 日志 (1)
- web (1)
- 编译原理 (1)
- 信息检索 (1)
- 性能,linux (1)
- spam (1)
- 序列化 (1)
- fabric (2)
- guice (1)
- disruptor (1)
- executor (1)
- logback (2)
- 开源 (1)
- 设计 (1)
- 监控 (3)
- english (1)
- 问题记录 (1)
- Bitmap (1)
- 云计算 (1)
- 问题排查 (1)
- highchat (1)
- mac (3)
- docker (1)
- jdk (1)
- 表达式 (1)
- 网络 (1)
- 时间管理 (1)
- 时间序列 (1)
- OLAP (1)
- Big Table (0)
- sql (1)
- kafka (1)
- md5 (1)
- springboot (1)
- spring security (1)
- Spring Boot (3)
- mybatis (1)
- java8 (1)
- 分布式事务 (1)
- 限流 (1)
- Shadowsocks (0)
- 2018 (1)
- 服务治理 (1)
- 设计原则 (1)
- log (0)
- perftools (1)
最新评论
-
siphlina:
课程——基于Python数据分析与机器学习案例实战教程分享网盘 ...
Python机器学习库 -
san_yun:
leibnitz 写道hi,我想知道,无论在92还是94版本, ...
hbase的行锁与多版本并发控制(MVCC) -
leibnitz:
hi,我想知道,无论在92还是94版本,更新时(如Puts)都 ...
hbase的行锁与多版本并发控制(MVCC) -
107x:
不错,谢谢!
Latent Semantic Analysis(LSA/ LSI)算法简介 -
107x:
不错,谢谢!
Python机器学习库
发表评论
-
MySQL 中的重做日志,回滚日志 ,以及二进制日志的简单总结
2018-06-06 17:44 1155ImportNew 5天前 (点击上方公众号,可快速关注) ... -
mysql 设置字符集 中文乱码
2016-02-04 15:45 2905一、登录MySQL查看用SHOW VARIABLES LIK ... -
mysql slow log控制
2014-08-28 10:15 5325参考官方文档:http://dev.mysql.com/do ... -
MySQL数据库InnoDB存储引擎 Buffer Pool Flush List详解
2014-08-21 10:36 1235原文:http://www.zhdba.com/mysqlo ... -
Percona-Server安装记录
2014-07-28 23:05 1410本文档记录安装Percona-Server开发环境,非生产 ... -
mysql创建用户权限
2014-07-11 17:01 766mysql 权限如下: root@localhost : ... -
mysql group测试脚本
2014-06-25 15:38 847sql数据语句: CREATE TABLE `access ... -
mysql性能优化之 show profile
2014-06-20 10:46 2431很漂亮的结果,没有creating sort index ... -
MYSQL INNODB中GAP LOCK引起死锁的问题
2014-06-06 13:08 2305先了解一下什么是GAP LOCK 在INNODB中,rec ... -
MySQL出现Waiting for table metadata lock的场景浅析
2014-04-23 14:27 695原文:http://ctripmysqldba.iteye ... -
mysql 索引原理
2014-03-27 20:02 494对于这条SQL: from message where ... -
mysql中group的实现
2014-01-24 10:31 742同学问到group by的实现 ... -
MySQL Innodb日志机制深入分析
2013-12-02 22:28 01.1. Log & Checkpoint In ... -
优化临时表使用,SQL语句性能提升100倍
2013-12-02 22:25 941【问题现象】 线上mysql数据库爆出一个慢查询,DBA观 ... -
也说快速关闭MySQL/InnoDB
2013-09-21 13:56 791原文:http://www.orczhou.com/ind ... -
关于mysql优化一些总结
2013-09-21 08:41 1067最近在做mysql数据库的 ... -
robbin谈MySQL InnoDB性能调整的一点实践
2013-09-21 08:13 753因为JavaEye网站的数据 ... -
mysql文档集合
2013-09-05 12:11 844理解MySQL——索引与优化 理解MySQL——架构与概念 ... -
mysql binlog细节
2013-09-05 12:06 1021原来mysql binlog内容是先保存在trx_cache中 ... -
MySQL如何避免使用swap
2013-09-04 09:52 1063原文: http://www.taobaodba.com/ ...
相关推荐
MySQL配置文件解析主要涉及到MySQL服务器的参数调整,这些参数直接影响数据库的性能和稳定性。配置文件通常命名为`my.cnf`或`my.ini`,在不同的操作系统路径可能不同。以下是几个关键参数的解释: 1. `port`:指定...
mysql配置文件,试用于linux,/zcv/zxcvasasldkfaskdf
某电商网站的生产环境的Mysql配置文件,放入/etc/下面即可
MySQL配置文件,MySQL
LogStash整合MySQL配置文件
MySQL配置文件详解,对配置文件做了详细介绍,功能作用,以及如何配置。
以下是关于MySQL配置文件读取顺序的详细说明。 ### 一、Windows环境下的配置文件读取顺序 在Windows操作系统中,MySQL服务遵循以下顺序读取配置文件: 1. **my.ini或my.cnf**:这是MySQL首选的配置文件名,通常...
Mac系统的MySQL基本配置文件,亲测可用,下载后不要直接打开,如何操作使用,我的博客里面有写。
在类NUIX的系统中,配置文件的位置一般在/etc/my.cnf 或者 /etc/MySQL/my.cnf ...以上就是小编为大家带来的查看linux服务器上mysql配置文件路径的方法全部内容了,希望大家多多支持软件开发网~ 您可能感兴
以下是对“mysql配置文件,通用配置”这一主题的详细说明。 **一、配置文件位置** 在大多数Linux系统中,MySQL的配置文件名为`my.cnf`或`my.ini`,通常位于`/etc/mysql/`或`C:\ProgramData\MySQL\...
这是mysql的配置文件,mysql多少版本之后没有了这个配置文件,需要自己创建
MySQL配置文件
### Linux CentOS MySQL 配置文件详解 #### 一、概览 在Linux CentOS环境中安装MySQL时,通过RPM包安装的方式会自带多个预设的配置文件。...此外,还可以参考官方文档或其他资源获取更多关于MySQL配置的最佳实践。
经验总结的服务器MySQL适用配置,避免大SQL导入、数据库备份等应用问题