加大mysql的最大连接数
mysql的最大连接数默认是100, 这个数值对于并发连接很多的数据库应用是远远不够的,可以把它适当调大,
方法一:
找到safe_mysqld或者mysqld_safe中的任何一个的位置,然后编辑它,找到mysqld启动的那两行,在后面加上参数
-O max_connections=1000
例如
if test "$#" -eq 0
then
nohup $ledir/mysqld --basedir=$MY_BASEDIR_VERSION --datadir=$DATADIR \
--skip-locking -O max_connections=1000 >> $err_log 2>&1
else
nohup $ledir/mysqld --basedir=$MY_BASEDIR_VERSION --datadir=$DATADIR \
--skip-locking "$@" -O max_connections=1000 >> $err_log 2>&1
fi
然后关闭mysql重启它。
方法二:
编辑my.cnf
在[mysqld]中加入:
set-variable=max_connections=1000
然后关闭mysql重启它。
用 /mysqladmin所在路径/mysqladmin -uroot -p variables |grep connection
输入root数据库账号的密码后可看到
| max_connections | 1000 |
即新改动已经生效。
mysql的最大连接数默认是100, 这个数值对于并发连接很多的数据库应用是远远不够的,可以把它适当调大,
方法一:
找到safe_mysqld或者mysqld_safe中的任何一个的位置,然后编辑它,找到mysqld启动的那两行,在后面加上参数
-O max_connections=1000
例如
if test "$#" -eq 0
then
nohup $ledir/mysqld --basedir=$MY_BASEDIR_VERSION --datadir=$DATADIR \
--skip-locking -O max_connections=1000 >> $err_log 2>&1
else
nohup $ledir/mysqld --basedir=$MY_BASEDIR_VERSION --datadir=$DATADIR \
--skip-locking "$@" -O max_connections=1000 >> $err_log 2>&1
fi
然后关闭mysql重启它。
方法二:
编辑my.cnf
在[mysqld]中加入:
set-variable=max_connections=1000
然后关闭mysql重启它。
用 /mysqladmin所在路径/mysqladmin -uroot -p variables |grep connection
输入root数据库账号的密码后可看到
| max_connections | 1000 |
即新改动已经生效。
安装php时出现的一个错误
使用mob_bw管理apache2下载带宽


2008/08/01 15:50 | by 