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

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

WBOY
Release: 2016-06-01 13:26:53
Original
1094 people have browsed it

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 *

#

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template