- 浏览: 58601 次
文章分类
最新评论
-
bo_hai:
再补充点东西,修改mysql的默认字符集:
vim /etc/ ...
Redhat Linux 5.x上安装mysql 5.6.10 -
bo_hai:
引用cp support-files/my-default.c ...
Redhat Linux 5.x上安装mysql 5.6.10 -
wangxiang243:
...
Redhat Linux 5.x上安装mysql 5.6.10
binlog-format可以取值: STATEMENT (default),ROW,MIXED。必须有SUPER才可以更改。不推荐replication正在进行时,修改binlog-format值。
binlog-do-db(binlog-ignore-db、replicate-do-db、replicate-ignore-db)对于多个数据库,必须用多行。因为数据库名字可以包含逗号,所以用逗号分隔多个数据库名字,会被认为是一个包含了逗号的数据库的名字。
无论binlog-format是什么,象create table和alter table之类的语句,总是以statement的格式记录在二进制日志中的。
binlog-do-db(binlog-ignore-db、replicate-do-db、replicate-ignore-db)生效与binlog-format有关:
binlog-format为STATEMENT时,生效的数据库为default database。
binlog-format为ROW时,生效的为表的所在的数据,与default database无关。
log-slave-updates 是否记录复制的更新。当用于级联复制时,很有必要。而在双主模式中,应当取FALSE。
auto_increment_increment
auto_increment_offset
取值为: auto_increment_offset + N*auto_increment_increment
sync-binlog 取值为0时,由操作系统的文件系统决定何时同步二进制日志。大于0时,为N个commit group后,同步到二进制日志。取值为1,最安全,但性能较低。
slave-ignore-errors 忽略复制的错误。不建议取值为all。正常情况下,不应该会有错;如果出错,应当解决错误,而不是忽略错误。
log-error 日志记录文件,记录MySQL服务器启动、关闭等信息。Windows平台注意路径要用“/”分隔,而不是“\”。
log-output (522页)
日志的记录位置:FILE TABLE NONE
sync_binlog (default 0, page 1849)
If the value of this variable is greater than 0, the MySQL server synchronizes its binary log to disk (using
fdatasync()) after sync_binlog[2129]commit groups are written to the binary log. The default
value of sync_binlog[2129]is 0, which does no synchronizing to disk—in this case, the server relies
on the operating system to flush the binary log's contents from to time as for any other file. A value of 1
is the safest choice because in the event of a crash you lose at most one commit group from the binary
log. However, it is also the slowest choice (unless the disk has a battery-backed cache, which makes
synchronization very fast).
innodb_flush_log_at_timeout (default 1, page 1810)
Write and flush the logs every Nseconds. This setting has an effect only when
innodb_flush_log_at_trx_commit[1811]has a value of 2.
innodb_flush_log_at_trx_commit (default 1, page 1811)
Controls the balance between strict ACIDcompliance for commitoperations, and higher performance
that is possible when commit-related I/O operations are rearranged and done in batches. You can
achieve better performance by changing the default value, but then you can lose up to one second worth
of transactionsin a crash.
• The default value of 1 is required for full ACID compliance. With this value, the log bufferis written out
to the log fileat each transaction commit and the flushto disk operation is performed on the log file.
• With a value of 0, any mysqldprocess crash can erase the last second of transactions. The log buffer
is written out to the log file once per second and the flush to disk operation is performed on the log file,
but no writes are done at a transaction commit.
• With a value of 2, only an operating system crash or a power outage can erase the last second of
transactions. The log buffer is written out to the file at each commit, but the flush to disk operation
is not performed on it. Before MySQL 5.6.6, the flushing on the log file takes place once per
second. Note that the once-per-second flushing is not 100% guaranteed to happen every second,
due to process scheduling issues. As of MySQL 5.6.6, flushing frequency is is controlled by
innodb_flush_log_at_timeout[1810]instead.
• InnoDB's crash recoveryworks regardless of the value. Transactions are either applied entirely or
erased entirely.
For the greatest possible durability and consistency in a replication setup using InnoDBwith
transactions, use innodb_flush_log_at_trx_commit=1and sync_binlog=1in your master
server my.cnffile.
thread_cache_size (default 8 + (max_connections / 100), page 580)
How many threads the server should cache for reuse. When a client disconnects, the client's threads
are put in the cache if there are fewer than thread_cache_size[580]threads there. Requests
for threads are satisfied by reusing threads taken from the cache if possible, and only when the cache
is empty is a new thread created. This variable can be increased to improve performance if you
have a lot of new connections. Normally, this does not provide a notable performance improvement
if you have a good thread implementation. However, if your server sees hundreds of connections
per second you should normally set thread_cache_size[580]high enough so that most new
connections use cached threads. By examining the difference between the Connections[618]and
Threads_created[632]status variables, you can see how efficient the thread cache is. For details,
see Section 5.1.6, “Server Status Variables”.
The default value is based on the following formula, capped to a limit of 100:
8 + (max_connections / 100)
binlog-do-db(binlog-ignore-db、replicate-do-db、replicate-ignore-db)对于多个数据库,必须用多行。因为数据库名字可以包含逗号,所以用逗号分隔多个数据库名字,会被认为是一个包含了逗号的数据库的名字。
无论binlog-format是什么,象create table和alter table之类的语句,总是以statement的格式记录在二进制日志中的。
binlog-do-db(binlog-ignore-db、replicate-do-db、replicate-ignore-db)生效与binlog-format有关:
binlog-format为STATEMENT时,生效的数据库为default database。
binlog-format为ROW时,生效的为表的所在的数据,与default database无关。
log-slave-updates 是否记录复制的更新。当用于级联复制时,很有必要。而在双主模式中,应当取FALSE。
auto_increment_increment
auto_increment_offset
取值为: auto_increment_offset + N*auto_increment_increment
sync-binlog 取值为0时,由操作系统的文件系统决定何时同步二进制日志。大于0时,为N个commit group后,同步到二进制日志。取值为1,最安全,但性能较低。
slave-ignore-errors 忽略复制的错误。不建议取值为all。正常情况下,不应该会有错;如果出错,应当解决错误,而不是忽略错误。
log-error 日志记录文件,记录MySQL服务器启动、关闭等信息。Windows平台注意路径要用“/”分隔,而不是“\”。
log-output (522页)
日志的记录位置:FILE TABLE NONE
sync_binlog (default 0, page 1849)
If the value of this variable is greater than 0, the MySQL server synchronizes its binary log to disk (using
fdatasync()) after sync_binlog[2129]commit groups are written to the binary log. The default
value of sync_binlog[2129]is 0, which does no synchronizing to disk—in this case, the server relies
on the operating system to flush the binary log's contents from to time as for any other file. A value of 1
is the safest choice because in the event of a crash you lose at most one commit group from the binary
log. However, it is also the slowest choice (unless the disk has a battery-backed cache, which makes
synchronization very fast).
innodb_flush_log_at_timeout (default 1, page 1810)
Write and flush the logs every Nseconds. This setting has an effect only when
innodb_flush_log_at_trx_commit[1811]has a value of 2.
innodb_flush_log_at_trx_commit (default 1, page 1811)
Controls the balance between strict ACIDcompliance for commitoperations, and higher performance
that is possible when commit-related I/O operations are rearranged and done in batches. You can
achieve better performance by changing the default value, but then you can lose up to one second worth
of transactionsin a crash.
• The default value of 1 is required for full ACID compliance. With this value, the log bufferis written out
to the log fileat each transaction commit and the flushto disk operation is performed on the log file.
• With a value of 0, any mysqldprocess crash can erase the last second of transactions. The log buffer
is written out to the log file once per second and the flush to disk operation is performed on the log file,
but no writes are done at a transaction commit.
• With a value of 2, only an operating system crash or a power outage can erase the last second of
transactions. The log buffer is written out to the file at each commit, but the flush to disk operation
is not performed on it. Before MySQL 5.6.6, the flushing on the log file takes place once per
second. Note that the once-per-second flushing is not 100% guaranteed to happen every second,
due to process scheduling issues. As of MySQL 5.6.6, flushing frequency is is controlled by
innodb_flush_log_at_timeout[1810]instead.
• InnoDB's crash recoveryworks regardless of the value. Transactions are either applied entirely or
erased entirely.
For the greatest possible durability and consistency in a replication setup using InnoDBwith
transactions, use innodb_flush_log_at_trx_commit=1and sync_binlog=1in your master
server my.cnffile.
thread_cache_size (default 8 + (max_connections / 100), page 580)
How many threads the server should cache for reuse. When a client disconnects, the client's threads
are put in the cache if there are fewer than thread_cache_size[580]threads there. Requests
for threads are satisfied by reusing threads taken from the cache if possible, and only when the cache
is empty is a new thread created. This variable can be increased to improve performance if you
have a lot of new connections. Normally, this does not provide a notable performance improvement
if you have a good thread implementation. However, if your server sees hundreds of connections
per second you should normally set thread_cache_size[580]high enough so that most new
connections use cached threads. By examining the difference between the Connections[618]and
Threads_created[632]status variables, you can see how efficient the thread cache is. For details,
see Section 5.1.6, “Server Status Variables”.
The default value is based on the following formula, capped to a limit of 100:
8 + (max_connections / 100)
发表评论
-
MySQL5.6:快速预热Buffer_Pool缓冲池
2014-03-03 17:54 1909数据库的buffer pool中的数据重启后,会丢失。因此,再 ... -
用alter table添加索引与create index区别
2014-03-03 17:12 22601、alter table一次可以添加多个索引,create ... -
MySQL 5.6的密码验证插件
2014-03-03 15:36 2775运行时加载validate_password插件: my ... -
MySQL变量:local_infile
2014-02-28 11:31 4063local_infile服务器变量指示能否使用load dat ... -
mysqlbinlog
2013-12-23 16:54 1646mysqlbinlog 会解析日志,并生成BINLOG语句,可 ... -
mysqlfabric
2013-12-15 23:00 644MySQL Fabric: Presentations htt ... -
多粒度锁机制
2013-11-28 22:42 1066Introduction to Transaction Loc ... -
MySQL 5.6中备份及还原performance_schema配置
2013-11-27 09:35 2928一、setup.txt文件,用于备份performance_s ... -
Waiting for table metadata lock
2013-11-26 18:15 1274一个没提交的事务使用了A表, 另外一个session 对A表进 ... -
mysqldump使用心得
2013-11-21 15:08 1001一、启用gtid时,部分库、表导出时,需要添加--set-gt ... -
sysbench 0.5安装步骤
2013-07-04 17:23 4113sysbench源代码可以在https://launchpad ... -
Linux平台文件大小的限制
2013-05-03 15:17 756Oracle中文件大小的限制为32G,是由rowid限制导致的 ... -
MySQL中忘记root密码的解决办法
2013-05-03 15:14 701可以用--skip-grant-tables选项启动服务器,启 ... -
MySQL中InnoDB存储引擎的事务隔离级别与事务处理
2013-05-03 15:04 6931、事务进行中,不得用set transaction命令更改隔 ... -
MySQL连接方式
2013-04-02 12:55 2410MySQL除了最常见的TCP连接方式外,还提供SOCKET(L ... -
Redhat Linux 5.x上启动多个mysql 5.6.10实例
2013-04-02 10:51 1572首先,确认MySQL 5.6.10软件已经安装。如未安装,请参 ... -
Redhat Linux 5.x上安装mysql 5.6.10
2013-04-02 10:14 3808一、获取安装文件 从MyS ... -
Keepalive+mysql(主主)高可用测试
2013-03-31 17:38 0原文:Keepalive+mysql(主主)高可用测试 htt ... -
keepalived参考文章
2013-03-30 20:34 1144keepalived 实现热备 http://i-david. ...
相关推荐
mysql常用操作注意:MySQL中每个命令后都要以分号;结尾。
mysql的选项文件my.ini,常用内容已写好,并且保存的是ansi格式,满足使用需要,在凑字数.
MYSQL常用命令 1.导出整个数据库 mysqldump -u 用户名 -p --default-character-set=latin1 数据库名 > 导出的文件名(数据库默认编码是latin1) mysqldump -u wcnc -p smgp_apps_wcnc > wcnc.sql 2.导出一个表 ...
5.2.3. MySQL实例管理器命令行选项 5.2.4. MySQL实例管理器配置文件 5.2.5. MySQL实例管理器识别的命令 5.3. mysqld:MySQL服务器 5.3.1. mysqld命令行选项 5.3.2. SQL服务器模式 5.3.3. 服务器系统变量 5.3.4. ...
8 MySQL 教程 8.1 联接和断开服务器 8.2 输入查询 8.3 常用查询的例子 8.3.1 列的最大值 8.3.2 拥有某个列的最大值的行 8.3.3 列的最大值:按组:只有值 8.3.4 拥有某个字段的组间...
8 MySQL 教程 8.1 联接和断开服务器 8.2 输入查询 8.3 常用查询的例子 8.3.1 列的最大值 8.3.2 拥有某个列的最大值的行 8.3.3 列的最大值:按组:只有值 8.3.4 拥有某个字段的...
5.2.3. MySQL实例管理器命令行选项 5.2.4. MySQL实例管理器配置文件 5.2.5. MySQL实例管理器识别的命令 5.3. mysqld:MySQL服务器 5.3.1. mysqld命令行选项 5.3.2. SQL服务器模式 5.3.3. 服务器系统变量 5.3.4...
5.2.3. MySQL实例管理器命令行选项 5.2.4. MySQL实例管理器配置文件 5.2.5. MySQL实例管理器识别的命令 5.3. mysqld:MySQL服务器 5.3.1. mysqld命令行选项 5.3.2. SQL服务器模式 5.3.3. 服务器系统变量 5.3.4. ...
5.2.3. MySQL实例管理器命令行选项 5.2.4. MySQL实例管理器配置文件 5.2.5. MySQL实例管理器识别的命令 5.3. mysqld:MySQL服务器 5.3.1. mysqld命令行选项 http://doc.mysql.cn/mysql5/refman-5.1-zh.html-chapter/...
3.6. 常用查询的例子 3.6.1. 列的最大值 3.6.2. 拥有某个列的最大值的行 3.6.3. 列的最大值:按组 3.6.4. 拥有某个字段的组间最大值的行 3.6.5. 使用用户变量 3.6.6. 使用外键 3.6.7. 根据两个键搜索 3.6.8. 根据天...
MySQL实例管理器命令行选项 5.2.4. MySQL实例管理器配置文件 5.2.5. MySQL实例管理器识别的命令 5.3. mysqld:MySQL服务器 5.3.1. mysqld命令行选项 5.3.2. SQL服务器模式 5.3.3. 服务器系统变量...
5.2.3. MySQL实例管理器命令行选项 5.2.4. MySQL实例管理器配置文件 5.2.5. MySQL实例管理器识别的命令 5.3. mysqld:MySQL服务器 5.3.1. mysqld命令行选项 5.3.2. SQL服务器模式 5.3.3. 服务器系统变量 5.3.4...
5.2.3. MySQL实例管理器命令行选项 5.2.4. MySQL实例管理器配置文件 5.2.5. MySQL实例管理器识别的命令 5.3. mysqld:MySQL服务器 5.3.1. mysqld命令行选项 5.3.2. SQL服务器模式 5.3.3. 服务器系统变量 5.3.4. ...
* 1 MySQL的一般的信息 o 1.1 什么是MySQL? o 1.2 关于本手册 + 1.2.1 本手册中使用的约定 o 1.3 MySQL的历史 o 1.4 MySQL的主要特征 o 1.5 MySQL稳定性? o 1.6 顺应2000年 o 1.7 SQL一般信息和教程 o ...
5.2.3. MySQL实例管理器命令行选项 5.2.4. MySQL实例管理器配置文件 5.2.5. MySQL实例管理器识别的命令 5.3. mysqld:MySQL服务器 5.3.1. mysqld命令行选项 5.3.2. SQL服务器模式 5.3.3. 服务器系统变量 ...
5.2.3. MySQL实例管理器命令行选项 5.2.4. MySQL实例管理器配置文件 5.2.5. MySQL实例管理器识别的命令 5.3. mysqld:MySQL服务器 5.3.1. mysqld命令行选项 5.3.2. SQL服务器模式 5.3.3. 服务器系统变量 5.3.4. ...
mysql配置(部分常用的参数) [mysqld] socket = /tmp/mysql.sock # 为MySQL客户程序与服务器之间的本地通信指定一个套接字文件(Linux下默认是/var/lib/mysql/mysql.sock文件) port = 3306 # 指定...