2020年11月15日

摘要: 1、二进制日志恢复数据 (1)查看所使用的日志 show master status; (2)查看日志的事务 show binlog events in 'mysql-bin.000005'; (3)截取日志,找到起点和终点 mysqlbinlog --start-position=276 --st 阅读全文
posted @ 2020-11-15 22:02 Mr.ruan 阅读(505) 评论(0) 推荐(0) 编辑
 
摘要: 1、错误日志: (1)查看日志地址 select @@log_error; (2)更改日志地址 log_error=/tmp/mysql3306err.log 2、二进制日志(binlog) (0) 查看二进制日志开启状态 select @@sql_log_bin; 开启关闭日志(关闭当前会话,全局 阅读全文
posted @ 2020-11-15 17:48 Mr.ruan 阅读(168) 评论(0) 推荐(0) 编辑
 
摘要: 1、Innodb_flush_log_at_trx_commit: 控制redo 往os buffer、磁盘 刷写的策略 (0) 每秒将redo buffer往os buffer(操作系统文件缓冲区) 刷写,每秒将os buffer同步到磁盘,如果宕机,会丢失一秒内的所有事务 (1) 事务每次com 阅读全文
posted @ 2020-11-15 11:44 Mr.ruan 阅读(127) 评论(0) 推荐(0) 编辑