本人数据库小白,遇到解决不了的问题了 特地来论坛求教:
最近在公司的本地windows服务器搭建一个bugzilla的测试环境,连接的也是同一个机器搭建的mysql服务器,搭建的步骤走完之后,bugzilla成功启动,首页展示正常,但是当我登录的时候,bugzilla就报错链接不到mysql,我一查进程确实死了,但是我启动mysql之后,同样的操作mysql依旧直接进程down掉。bugzilla的页面报错如下:[color=#FF0000][color=#FF0000]DBD::mysql::db selectall_arrayref failed: Lost connection to MySQL server during query [for Statement "SELECT DISTINCT grantor_id, member_id
                FROM group_group_map
                WHERE grant_type = 0"] at Bugzilla/User.pm line 869.
Bugzilla::User::groups('Bugzilla::User=HASH(0x2cfc93c)') called at Bugzilla/User.pm line 1024
Bugzilla::User::in_group('Bugzilla::User=HASH(0x2cfc93c)', 'admin') called at E:\bugzila\bugzilla-5.0\index.cgi line 39
报错里的这个sql我试了下直接在mysql执行,也是进程直接挂:
SQL 查询: SELECT DISTINCT grantor_id, member_id
                FROM group_group_map
                WHERE grant_type = 0 LIMIT 0, 25MySQL 返回: 
#2006 - MySQL server has gone away
这个mysql我之间用都是正常的,包括数据库 表结构的创建,和其他服务同步数据等,就是这个bugzilla服务一连就挂掉,实在想不出问题的原因了,希望各位指点迷津 谢谢了

解决方案 »

  1.   

    可以看一下mysql的错误日志
      

  2.   

    这个是我抓取的mysql服务挂掉时的错误日志,麻烦各位大神帮忙分析下可能的问题原因:
    01:17:27 UTC - mysqld got exception 0xc000001d ;
    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.
    Attempting to collect some information that could help diagnose the problem.
    As this is a crash and something is definitely wrong, the information
    collection process might fail.key_buffer_size=8388608
    read_buffer_size=8192
    max_used_connections=2
    max_threads=151
    thread_count=2
    connection_count=2
    It is possible that mysqld could use up to 
    key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 49892 K  bytes of memory
    Hope that's ok; if not, decrease some variables in the equation.Thread pointer: 0xe525a70
    Attempting backtrace. You can use the following information to find out
    where mysqld died. If you see no messages after this, something went
    terribly wrong...
    7fef9c72bc3    MSVCR120.dll!log()
    13feea58c    mysqld.exe!?copy_min_to_min@SEL_ARG@@QEAAXPEAV1@@Z()
    13feed9a5    mysqld.exe!?free_tree@SEL_ARG@@QEAAXXZ()
    13fefa21e    mysqld.exe!?test_quick_select@@YAHPEAVTHD@@V?$Bitmap@$0EA@@@_K2_NW4enum_order@st_order@@PEBVQEP_shared_owner@@PEAVItem@@PEAV2@PEAPEAVQUICK_SELECT_I@@@Z()
    13faa6e4e    mysqld.exe!?get_op_type@Ft_hints@@QEAA?AW4ft_operation@@XZ()
    13faa58ad    mysqld.exe!?estimate_rowcount@JOIN@@AEAA_NXZ()
    13faa8619    mysqld.exe!?make_join_plan@JOIN@@AEAA_NXZ()
    13faaa18b    mysqld.exe!?optimize@JOIN@@QEAAHXZ()
    13faf2559    mysqld.exe!?optimize@st_select_lex@@QEAA_NPEAVTHD@@@Z()
    13faf057d    mysqld.exe!?handle_query@@YA_NPEAVTHD@@PEAULEX@@PEAVQuery_result@@_K3@Z()
    13f964267    mysqld.exe!?execute_init_command@@YAXPEAVTHD@@PEAUst_mysql_lex_string@@PEAUst_mysql_rwlock@@@Z()
    13f966196    mysqld.exe!?mysql_execute_command@@YAHPEAVTHD@@_N@Z()
    13f969bf3    mysqld.exe!?mysql_parse@@YAXPEAVTHD@@PEAVParser_state@@@Z()
    13f962c93    mysqld.exe!?dispatch_command@@YA_NPEAVTHD@@PEBTCOM_DATA@@W4enum_server_command@@@Z()
    13f963cda    mysqld.exe!?do_command@@YA_NPEAVTHD@@@Z()
    13f90a80c    mysqld.exe!handle_connection()
    140365932    mysqld.exe!?reserve@?$vector@EV?$allocator@E@std@@@std@@QEAAX_K@Z()
    140077e6c    mysqld.exe!my_thread_once()
    7fef9c04f7f    MSVCR120.dll!_beginthreadex()
    7fef9c05126    MSVCR120.dll!_endthreadex()
    7738f34d    kernel32.dll!BaseThreadInitThunk()
    774c2ca1    ntdll.dll!RtlUserThreadStart()Trying to get some variables.
    Some pointers may be invalid and cause the dump to abort.
    Query (ebfa630): SELECT DISTINCT grantor_id, member_id
                    FROM group_group_map
                    WHERE grant_type = 0 LIMIT 0, 25
    Connection ID (thread ID): 19
    Status: NOT_KILLEDThe manual page at http://dev.mysql.com/doc/mysql/en/crashing.html contains
    information that should help you find out what is causing the crash.

      

  3.   

    group_group_map表内的grantor_id, member_id两个字段是否有重复值,有可能是数据唯一性的原因导致的