蜗牛的JAVA外壳

┎Running Snail┒ ┖ -------------- ┚

  BlogJava :: 首页 :: 联系 :: 聚合  :: 管理
  13 Posts :: 0 Stories :: 10 Comments :: 0 Trackbacks

今天发现执行mysql的 REPLACE INTO 的时候mysql返回 #1114 - The table ‘xxxx’ is full
这个错误。。。
以前没有遇到过,于是查找资料解决这个问题。。。

得知是由于内存表的大小超过了规定的范围,于是搜索解决方法,
网上提到的有两种解决方法,
一种是修改tmp_table_size参数,另外一种是修改max_heap_table_size参数。。。

[root@localhost etc]# vi /etc/rc.d/init.d/mysql
找到
$bindir/mysqld_safe --datadir=$datadir --pid-file=$pid_file >/dev/null 2>&1 &
修改为
$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

查看是否己修改

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)

己经修改成功!
注意:修改参数值是按照M单位来计算的。。。
posted on 2007-12-05 12:00 会跑的蜗牛 阅读(1372) 评论(0)  编辑  收藏 所属分类: Linux

只有注册用户登录后才能发表评论。


网站导航: