摘要: 备份必加参数: -R:在备份时,同时备份存储过程和函数,相当于linux的shell脚本 -E:在备份时,同时备份event,相当于linux里的定时备份命令crontab --triggers:在备份时同时备份触发器, --master-data=2:记录备份开始时的position号,可作为将来 阅读全文
posted @ 2021-02-01 18:20 linuxTang 阅读(151) 评论(0) 推荐(0)
摘要: 优化相关的日志-slowlog 作用:记录慢SQL语句的日志,定位低效SQL语句的工具日志 开启慢日志:slow_query_log=1 慢日志文件的位置:slow_query_log_file=/data/mysql/slow.log 设定慢查询时间为0.1秒:long_query_time=0. 阅读全文
posted @ 2021-02-01 14:56 linuxTang 阅读(919) 评论(0) 推荐(0)
摘要: 1查看有多少个事务 3号文件里有372个事务 mysql> show master status; + + + + + + | File 3号文件 | Position | Binlog_Do_DB | Binlog_Ignore_DB | Executed_Gtid_Set 本机一共运行了372个 阅读全文
posted @ 2021-02-01 11:22 linuxTang 阅读(717) 评论(0) 推荐(0)