Home >Database >Mysql Tutorial >【MySQL】关于MySQL错误日志信息的收集_MySQL

【MySQL】关于MySQL错误日志信息的收集_MySQL

WBOY
WBOYOriginal
2016-06-01 13:26:531085browse

bitsCN.com

为方便维护MySQL,写了个脚本用以提供收集错误信息的接口。这些错误信息来自与MySQL错误日志,而 通过grep mysql可以获取error-log的路径。

 #!/usr/bin/env python2.7
#-*- encoding: utf-8 -*-

"""
该模块用于提取每天mysql日志中的异常或错误信息
author: xiaomo
email: moxiaomomo@gmail.com
"""

import os
import sys
import string
from datetime import *

#

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn