查询mysql当前连接数
1.show status
Threads_connected 当前的连接数
Connections 试图连接到(不管是否成功)MySQL服务器的连接数。
Max_used_connections 服务器启动后已经同时使用的连接的最大数量。
2.set GLOBAL max_connections=连接数;
flush privileges
3.修改/etc/my.cnf中的max_connections
4.show processlist 显示当前正在执行的mysql连接
5.mysqladmin -u<user> -p<pwd> -h<host> status
显示当前mysql状态
Uptime: 13131 Threads: 1 Questions: 22 Slow queries: 0 Opens: 16 Flush tables: 1 Open tables: 1 Queries per second avg: 0.1
mysqladmin -u<user> -p<pwd> -h<host> extended-status
显示mysql的其他状态
+-----------------------------------+----------+
| Variable_name | Value |
+-----------------------------------+----------+
| Aborted_clients | 0 |
| Aborted_connects | 1 |
| Binlog_cache_disk_use | 0 |
| Binlog_cache_use | 0 |
| Bytes_received | 1152 |
| Bytes_sent | 10400 |
| Com
相关文档:
在为用户提供动态内容方面,PHP和MySQL是一个强大的组合。这些年来,这两项产品已经跨越了它们最初的应用舞台,现在,一些世界上最繁忙的网站也在应用它们。虽然它们当初都是开源软件,只能在UNIX/Linux上运行,但经过相当一段时期的发展,它们已能在Windows平台上运行。
在本文中,我将逐步为你们说明如何在Windows环境中 ......
引用http://hi.baidu.com/mygf/blog/item/b9f55d60049a2ed58cb10d64.html
2009-10-24 00:23
一,获取mysql用户下的进程总数
ps -ef | awk '{print $1}' | grep "mysql" | grep -v "grep" | wc-1
二,主机性能状态
# uptime
[root@ ~]# uptime
13:05:52 up 53 days, 52 min, 1 user, l ......
Vs2005连接mysql数据库
一、下载支持mysql的微软的通用类mysql-connector-net-1.0.7-noinstall.zip
二、下载地址http://www.cnblogs.com/eugenewu0808/archive/2006/10/11/mysqldata.html
三、解压文件
四、添加引用找到bin文件夹找到net-2.0 vs2005的(和vs相应版本的)找到MySql.Data.dll
五、在类中引用using MySq ......
1.今天的程序发布到服务器,过了一晚后发现程序不能访问了,好像是连接池问题。错误如下: [log4j:] 2009-10-30 17:32:10,353 - com.school.dao.OperaDAO -65984388 [http-8080-12] ERROR com.school.dao.OperaDAO - find all failed
org.hibernate.exception.JDBCConnectionException: could not execute query ......
QT DataBase SQL Explorer
1、安装MySQL到官方网站下载MySQL数据库,非安装版,直接运行mysqld进程前台的
2、添加系统环境变量,Path+=':\mysql\bin'的path,再在开始运行,CMD->mysql -uroot 登录到mySQL数据库
Default password没有的,有的话 mysql -uroot -p输入密码;网络登录:mysql -h ip ......