GB | BIG5
|
| 首頁 > 數據庫 > MySQL > 正文 |
 |
| 加大mysql的最大連接數 |
| 本文出自: 作者: (2001-07-05 14:08:00) |
mysql的最大連接數默認是100, 這個數值對並發連接很多的數據庫應用是遠遠不夠
的,可以把它適當調大,
whereis safe_mysqld
找到safe_mysqld的位置,然編輯它,找到mysqld啟動的那兩行,在面加上參數
-O max_connections=1000
例如
--- safe_mysqld.orig Mon Sep 25 09:34:01 2000
+++ safe_mysqld Sun Sep 24 16:56:46 2000
@@ -109,10 +109,10 @@
if test "$#" -eq 0
then
nohup $ledir/mysqld --basedir=$MY_BASEDIR_VERSION --datadir=$DATADIR \
- --skip-locking >> $err_log 2>&1
+ --skip-locking -O max_connections=1000 >> $err_log 2>&1
else
nohup $ledir/mysqld --basedir=$MY_BASEDIR_VERSION --datadir=$DATADIR \
- --skip-locking "$@" >> $err_log 2>&1
+ --skip-locking "$@" -O max_connections=1000 >> $err_log 2>&1
fi
if test ! -f $pid_file # This is removed if normal shutdown
then
然關閉mysql重啟它,用
/mysqladmin所在路徑/mysqladmin -uroot -p variables
輸入root數據庫賬號的密碼可看到
| max_connections | 1000 |
即新改動已經生效。
(http://www.fanqiang.com)
進入【UNIX論壇】
|
|
| 相關文章 |
|
|
|
|
 |
★ 樊強制作 歡迎分享 ★ |