在32位redhat上安装运行良好
在64位redhat上也可以安装运行,但是mysql会经常自动重启(数据可以正常显示),错误日志为:
==========================================================================================
mysqld got signal 11;
This could be because you hit a bug. It is also possible that this binary
or one of the libraries it was linked against is corrupt, improperly built,
or misconfigured. This error can also be caused by malfunctioning hardware.
We will try our best to scrape up some info that will hopefully help diagnose
the problem, but since we have already crashed, something is definitely wrong
and this may fail.key_buffer_size=402653184
read_buffer_size=2093056
max_used_connections=0
max_connections=1000
threads_connected=0
It is possible that mysqld could use up to 
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_connections = 4485208 K
bytes of memory
Hope that's ok; if not, decrease some variables in the equation.
Number of processes running now: 0
090514 15:09:09  mysqld restarted
/usr/local/mysql/libexec/mysqld: ready for connections.
Version: '4.0.20'  socket: '/tmp/mysql.sock'  port: 3306
===========================================================================================
在/etc/my.cnf是删除max_connections=1000这一行也无济于事.
mysql的编译:./configure --prefix=/usr/local/mysql --enable-assembler --with-client-ldflags=-all-static --with-mysqld-ldflags=-all-static --disable-shared

解决方案 »

  1.   

    改小一点试试。max_connections=100
      

  2.   

    MYSQL有FOR 64位的,安装试试
      

  3.   

    试了一下午解决了问题
    thread_cache =8
    把一句屏蔽了,mysql运行正常,这是为什么呢?
      

  4.   

    线程的创建和销毁的开销可能很大,因为每个线程的连接/断开都需要。我通常至少设置为 16。如果应用程序中有大量的跳跃并发连接并且 Threads_Created 的值也比较大,那么我就会加大它的值。它的目的是在通常的操作中无需创建新线程。
      

  5.   

    thread_cache_size  这个系统参数,是系统会缓存的线程数,当一个用户断开连接后,如果总的连接线程数低于这个thread_cache_size 时,则系统会缓存这个线程而不是释放。这样只有当缓存中没有线程时,系统才需要为新的连接创建线程,以提高系统效率。你去掉这个参数的定义后,系统的默认值为0,也就是不缓存。这样内存也会减少占用。但8个线程,不应该导致你的内存不足啊。如果是这样,改成16只会死得更快。建议检查一下 key_buffer_size 是不是太大了?你一共多少G内存?一下子分了4G。
      

  6.   

    16G内存,4核CPU*2
    key_buffer_size=384M (不是4G哦)
    我感觉不是内存的原因,我将key_buffer_size改为16M,read_buffer_size=16K,sort_buffer_size=256K还是自动重启
    但是将thread_cache 屏蔽后就正常了,目前用的配置是
    key_buffer_size=384M
    read_buffer_size=2M
    sort_buffer_size=2M