寰楃煡鏄敱浜庡唴瀛樿〃鐨勫ぇ灝忚秴榪囦簡瑙勫畾鐨勮寖鍥達紝浜庢槸鎼滅儲瑙e喅鏂規硶錛?br />
緗戜笂鎻愬埌鐨勬湁涓ょ瑙e喅鏂規硶錛?br />
涓縐嶆槸淇敼tmp_table_size鍙傛暟錛屽彟澶栦竴縐嶆槸淇敼max_heap_table_size鍙傛暟銆傘傘?/p>
[root@localhost etc]# vi /etc/rc.d/init.d/mysql
鎵懼埌
$bindir/mysqld_safe --datadir=$datadir --pid-file=$pid_file >/dev/null 2>&1 &
淇敼涓?br />
$bindir/mysqld_safe --datadir=$datadir --pid-file=$pid_file -O tmp_table_size=64M -O max_heap_table_size=32M >/dev/null 2>&1 &
閲嶅惎mysql
[root@localhost etc]# /usr/bin/mysqladmin -u root -p shutdown
Enter password:
[root@localhost etc]# /etc/init.d/mysql start
[root@localhost etc]# mysql
鏌ョ湅鏄惁宸變慨鏀?br />
mysql> show variables like '%max_heap_table_size%';
+---------------------+----------+
| Variable_name | Value |
+---------------------+----------+
| max_heap_table_size | 33553408 |
+---------------------+----------+
1 row in set (0.00 sec)
mysql> show variables like '%tmp_table_size%';
+----------------+----------+
| Variable_name | Value |
+----------------+----------+
| tmp_table_size | 67108864 |
+----------------+----------+
1 row in set (0.00 sec)