易截截图软件、单文件、免安装、纯绿色、仅160KB

nagios 检查 mysql服务

 http://blog.c1gstudio.com/archives/602
nagios_plugin安装时正确关联mysql后会在libexec下产生check_mysql文件
/usr/local/nagios/libexec/check_mysql -h
 
check_mysql v2034 (nagios-plugins 1.4.13)
Copyright (c) 1999-2007 Nagios Plugin Development Team
        <nagiosplug-devel@lists.sourceforge.net>
 
This program tests connections to a mysql server
 
 
Usage: check_mysql [-d database] [-H host] [-P port] [-s socket]
       [-u user] [-p password] [-S]
 
Options:
 -h, --help
    Print detailed help screen
 -V, --version
    Print version information
 -H, --hostname=ADDRESS
    Host name, IP Address, or unix socket (must be an absolute path)
 -P, --port=INTEGER
    Port number (default: 3306)
 -s, --socket=STRING
    Use the specified socket (has no effect if -H is used)
 -d, --database=STRING
    Check database with indicated name
 -u, --username=STRING
    Connect using the indicated username
 -p, --password=STRING
    Use the indicated password to authenticate the connection
    ==> IMPORTANT: THIS FORM OF AUTHENTICATION IS NOT SECURE!!! <==
    Your clear-text password could be visible as a process table entry
 -S, --check-slave
    Check if the slave thread is running properly.
 -w, --warning
    Exit with WARNING status if slave server is more than INTEGER seconds
    behind master
 -c, --critical
    Exit with CRITICAL status if slave server is more then INTEGER seconds
    behind master
 
 There are no required arguments. By default, the local database is checked
 using the default unix socket. You can force TCP on localhost by using an
 IP


相关文档:

MySql 常见异常


1016错误:文件无法打开,使用后台修复或者使用phpmyadmin进行修复。
1044错误:数据库用户权限不足,请联系空间商解决
1045错误:数据库服务器/数据库用户名/数据库名/数据库密码错误,请联系空间商检查帐户。
1054错误:程序文件跟数据库有冲突,请使用正确的程序文件上传上去覆盖。
1146错误:数据表缺失,请恢 ......

JDBC连接执行MySQL存储过程报空指针或权限错误

 最近使用root用户编写了几个存储过程,但是使用普通用户通过JDBC连接执行却报错:
java.lang.NullPointerException......

java.sql.SQLException: User does not have access to metadata required to determine stored procedure parameter types. If rights can not be granted, configure connection with " ......

用mysqldumpslow分析mysql的slow query log

mysql有一个功能就是可以log下来运行的比较慢的sql语句,默认是没有这个log的,为了开启这个功能,
要修改my.cnf或者在mysql启动的时候加入一些参数。如果在my.cnf里面修改,需增加如下几行
long_query_time = 1
log-slow-queries = /var/youpath/slow.log
log-queries-not-using-indexes
long_query_time 是指执 ......

fedora12下安装apache+php+mysql(LAMP)+phpmyadmin

1 安装MySQL5
用下列命令安装MySQL:
yum install mysql mysql-server
然后我们为MySQL创建系统启动链接(这样的话,MySQL就会随着系统启动而启动),并启动MySQL服务器:
chkconfig –levels 235 mysqld on
/etc/init.d/mysqld start
运行
mysqladmin -u root password yourrootsqlpassword
来为root用户设置 ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号