vi /usr/bin/mysqld_safe
鎵懼埌mysqld鍚姩鐨勯偅涓よ錛屽湪鍚庨潰鍔犱笂鍙傛暟 錛?/p>
-O max_connections=1000
錛堝ぇ姒傚湪300澶氳宸﹀彸錛夛紝鍙悳绱㈠叧閿瘝 if test -z "$args"
if test -z "$args"
then
$NOHUP_NICENESS $ledir/$MYSQLD $defaults --basedir=$MY_BASEDIR_VERSION --datadir=$DATADIR $USER_OPTION --pid-file=$pid_file --skip-external-locking -O max_connections=1000 >> $err_log 2>&1
else
eval "$NOHUP_NICENESS $ledir/$MYSQLD $defaults --basedir=$MY_BASEDIR_VERSION --datadir=$DATADIR $USER_OPTION --pid-file=$pid_file --skip-external-locking $args -O max_connections=1000 >> $err_log 2>&1"
fi
鎴栬呬慨鏀?my.cnf
vi /etc/my.cnf
鍦ㄦ渶鍚庢坊鍔犲涓嬩唬鐮?/p>
[mysqld]
set-variable=max_connections=1000
鏌ョ湅Mysql榪炴帴鏁?/p>
mysqladmin -uroot -p processlist