易截截图软件、单文件、免安装、纯绿色、仅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


相关文档:

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 " ......

mysql show status


查看服务器目前状态信息的命令,两种方式:
 
1.      命令行,进入mysql/bin目录下,输入mysqladmin extended-status
2.      连接到mysql,输入show status;
3.      如果要查看某个数据,可以
mysql> show s ......

MYSQL的一些小记

下午看了一段PHP100的视频。
也算有点收获。
里面的一段自写的findall的SQL函数:
public function findall($table) {
$this->query("SELECT * from $table");
}

原来只是这么简单,刚还在思考。
使用了TAB键上面的顿号来修饰MYSQL里的字段名,如:
UPDATE tablename SET `fieldname`='values' wh ......

将Excel数据导入MySql

将Excel数据导入MySql
 
1.将选中的数据快儿拷贝到一个TXT文本文件中(记得把后面的空格消掉。。),假如存到“D:\data.txt”这个位置里。
2.根据要导入的数据快儿建立MySql数据库和表,然后进入命令提示符里使用命令
load data local infile 'D:\data.txt' into table exceltomysql fields terminated ......

mysql命令_基础

显示mysql基本信息:mysql>status;
查看变量:show variables like '%version%';
备份与还原命令:在最后还有
1.备份MySQL数据库的命令:
在cmd中进入到mysql的lib目录下执行如下:
mysqldump -hhostname -uusername -ppassword databaseName > backupfile.sql
例:mysqldump -hlocalhost -uroot -p123456 test ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号