北京SEO

删除MySQL二进制日志(log-bin)

2019/10/10/17:34:36  阅读:2022  来源:谷歌SEO算法  标签: Google

本文章来告诉大怎么在mysql命令模式下载删除 MySQL 二进制日志(log-bin)的方法,有需要的朋友可参考.

查找当前有哪些二进制日志文件,代码如下:

  1. mysql>showbinarylogs;
  2. +------------------+-----------+
  3. |Log_name|File_size|
  4. +------------------+-----------+
  5. |mysql-bin.000001|1357315|
  6. |mysql-bin.000002|117|
  7. |mysql-bin.000003|404002|
  8. |mysql-bin.000004|2050722|
  9. |mysql-bin.000005|139103|
  10. |mysql-bin.000006|46702|
  11. |mysql-bin.000007|117|
  12. |mysql-bin.000008|98|
  13. |mysql-bin.000009|117|
  14. |mysql-bin.000010|1254|
  15. |mysql-bin.000011|117|
  16. |mysql-bin.000012|29394942|
  17. |mysql-bin.000013|422100|
  18. |mysql-bin.000014|117|
  19. |mysql-bin.000015|117|
  20. |mysql-bin.000016|98|
  21. |mysql-bin.000017|117|
  22. |mysql-bin.000018|117|
  23. |mysql-bin.000019|285300|
  24. |mysql-bin.000020|181229|
  25. |mysql-bin.000021|98|
  26. +------------------+-----------+
  27. 21rowsinset(0.03sec)

删除bin-log(删除mysql-bin.000018之前的所有二进制日志文件),代码如下:

  1. mysql>purgebinarylogsto'mysql-bin.000018';
  2. QueryOK,0rowsaffected(0.08sec)
  3. --phpfensi.com
  4. mysql>showbinarylogs;
  5. +------------------+-----------+
  6. |Log_name|File_size|
  7. +------------------+-----------+
  8. |mysql-bin.000018|117|
  9. |mysql-bin.000019|285300|
  10. |mysql-bin.000020|181229|
  11. |mysql-bin.000021|98|
  12. +------------------+-----------+
  13. 4rowsinset(0.00sec)

查看日志,代码如下:

  1. mysql>showbinlogevents;
  2. +------------------+-----+-------------+-----------+-------------+---------------------------------------+
  3. |Log_name|Pos|Event_type|Server_id|End_log_pos|Info|
  4. +------------------+-----+-------------+-----------+-------------+---------------------------------------+
  5. |mysql-bin.000018|4|Format_desc|1|98|Serverver:5.0.45-log,Binlogver:4|
  6. |mysql-bin.000018|98|Stop|1|117||
  7. +------------------+-----+-------------+-----------+-------------+---------------------------------------+
  8. 2rowsinset(0.01sec)

广告内容

删除MySQL二进制日志(log-bin) 删除MySQL二进制日志(log-bin) 删除MySQL二进制日志(log-bin)

相关阅读

热门评论

小浪SEO博客 小浪SEO博客

专注SEO优化思维、SEO技术的实战分享类博客~

总篇数183

精选文章

RMAN中catalog和nocatalog区别介绍 小技巧:为Linux下的文件分配多个权限 zimbra8.5.1安装第三方签名ssl证书的步骤 解决mysql不能远程连接数据库方法 windows服务器mysql增量备份批处理数据库 mysql中slow query log慢日志查询分析 JavaScript跨域问题总结 Linux下负载均衡软件LVS配置(VS/DR)教程 mysql中权限参数说明 MYSQL(错误1053)无法正常启动

SEO最新算法