MySQL服务器在PHP中使用PDO连接已经消失

时间:2015-12-27 00:35:26

标签: php mysql

所以基本上我的网页都试图连接到数据库,但是当我尝试打开网页时,会打印错误并且我的数据库停止工作。

Warning: PDOStatement::execute(): MySQL server has gone away

这是在MySQL Workbench中打印的

FROM KORNELPC.err:
      00:18:29 UTC - mysqld got exception 0xc0000005 ;
      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=65536
      max_used_connections=4
      max_threads=151
      thread_count=4
      connection_count=4
      It is possible that mysqld could use up to 
      key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 58341 K  bytes of memory
      Hope that's ok; if not, decrease some variables in the equation.
      Thread pointer: 0x28a9c04f8e0
      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...
      7ff7329bd542    mysqld.exe!?exec@Item_subselect@@UEAA_NXZ()
      7ff7329c32ab    mysqld.exe!?val_int@Item_singlerow_subselect@@UEAA_JXZ()
      7ff7328853dc    mysqld.exe!?val_int@Item_direct_ref@@UEAA_JXZ()
      7ff73282f62c    mysqld.exe!?compare_int_signed@Arg_comparator@@QEAAHXZ()
      7ff73283d4b1    mysqld.exe!?val_int@Item_func_gt@@UEAA_JXZ()
      7ff732883a41    mysqld.exe!?val_bool@Item@@UEAA_NXZ()
      7ff732831ce6    mysqld.exe!?find_item@Item_func_case@@QEAAPEAVItem@@PEAVString@@@Z()
      7ff73283d3f6    mysqld.exe!?val_int@Item_func_case@@UEAA_JXZ()
      7ff7328853dc    mysqld.exe!?val_int@Item_direct_ref@@UEAA_JXZ()
      7ff73282f62c    mysqld.exe!?compare_int_signed@Arg_comparator@@QEAAHXZ()
      7ff73283d451    mysqld.exe!?val_int@Item_func_eq@@UEAA_JXZ()
      7ff732883a41    mysqld.exe!?val_bool@Item@@UEAA_NXZ()
      7ff73283cb9c    mysqld.exe!?val_int@Item_cond_and@@UEAA_JXZ()
      7ff732dd682e    mysqld.exe!?end_write_group@@YA?AW4enum_nested_loop_state@@PEAVJOIN@@PEAVQEP_TAB@@_N@Z()
      7ff732dda437    mysqld.exe!?sub_select@@YA?AW4enum_nested_loop_state@@PEAVJOIN@@PEAVQEP_TAB@@_N@Z()
      7ff732dd56c1    mysqld.exe!?create_intermediate_table@JOIN@@AEAA_NPEAVQEP_TAB@@PEAV?$List@VItem@@@@AEAVORDER_with_src@1@_N@Z()
      7ff732dd703b    mysqld.exe!?exec@JOIN@@QEAAXXZ()
      7ff7329bdd7d    mysqld.exe!?exec@subselect_single_select_engine@@UEAA_NXZ()
      7ff7329bd5ee    mysqld.exe!?exec@Item_subselect@@UEAA_NXZ()
      7ff7329c32ab    mysqld.exe!?val_int@Item_singlerow_subselect@@UEAA_JXZ()
      7ff7328b72e0    mysqld.exe!?int_op@Item_func_plus@@UEAA_JXZ()
      7ff7328be2c3    mysqld.exe!?val_int@Item_func_numhybrid@@UEAA_JXZ()
      7ff73287fb0a    mysqld.exe!?save_in_field_inner@Item@@MEAA?AW4type_conversion_status@@PEAVField@@_N@Z()
      7ff73287f8ef    mysqld.exe!?save_in_field@Item@@QEAA?AW4type_conversion_status@@PEAVField@@_N@Z()
      7ff732dd4de3    mysqld.exe!?copy_funcs@@YA_NPEAV?$Mem_root_array@PEAVItem@@$00@@PEBVTHD@@@Z()
      7ff732dd6485    mysqld.exe!?end_send_group@@YA?AW4enum_nested_loop_state@@PEAVJOIN@@PEAVQEP_TAB@@_N@Z()
      7ff732dda540    mysqld.exe!?sub_select_op@@YA?AW4enum_nested_loop_state@@PEAVJOIN@@PEAVQEP_TAB@@_N@Z()
      7ff732dd69b5    mysqld.exe!?end_write_group@@YA?AW4enum_nested_loop_state@@PEAVJOIN@@PEAVQEP_TAB@@_N@Z()
      7ff732dda437    mysqld.exe!?sub_select@@YA?AW4enum_nested_loop_state@@PEAVJOIN@@PEAVQEP_TAB@@_N@Z()
      7ff732dd69b5    mysqld.exe!?end_write_group@@YA?AW4enum_nested_loop_state@@PEAVJOIN@@PEAVQEP_TAB@@_N@Z()
      7ff732dda437    mysqld.exe!?sub_select@@YA?AW4enum_nested_loop_state@@PEAVJOIN@@PEAVQEP_TAB@@_N@Z()
      7ff732dd56c1    mysqld.exe!?create_intermediate_table@JOIN@@AEAA_NPEAVQEP_TAB@@PEAV?$List@VItem@@@@AEAVORDER_with_src@1@_N@Z()
      7ff732dd703b    mysqld.exe!?exec@JOIN@@QEAAXXZ()
      7ff732a7ceba    mysqld.exe!?materialize_derived@TABLE_LIST@@QEAA_NPEAVTHD@@@Z()
      7ff732dd780d    mysqld.exe!?join_materialize_derived@@YAHPEAVQEP_TAB@@@Z()
      7ff732dd882a    mysqld.exe!?prepare_scan@QEP_TAB@@QEAA_NXZ()
      7ff732dda2e7    mysqld.exe!?sub_select@@YA?AW4enum_nested_loop_state@@PEAVJOIN@@PEAVQEP_TAB@@_N@Z()
      7ff732dd56c1    mysqld.exe!?create_intermediate_table@JOIN@@AEAA_NPEAVQEP_TAB@@PEAV?$List@VItem@@@@AEAVORDER_with_src@1@_N@Z()
      7ff732dd703b    mysqld.exe!?exec@JOIN@@QEAAXXZ()
      7ff7329a8571    mysqld.exe!?handle_query@@YA_NPEAVTHD@@PEAULEX@@PEAVQuery_result@@_K3@Z()
      7ff7328627f6    mysqld.exe!?execute_init_command@@YAXPEAVTHD@@PEAUst_mysql_lex_string@@PEAUst_mysql_rwlock@@@Z()
      7ff7328646de    mysqld.exe!?mysql_execute_command@@YAHPEAVTHD@@_N@Z()
      7ff732867faa    mysqld.exe!?mysql_parse@@YAXPEAVTHD@@PEAVParser_state@@@Z()
      7ff7328612c9    mysqld.exe!?dispatch_command@@YA_NPEAVTHD@@PEBTCOM_DATA@@W4enum_server_command@@@Z()
      7ff73286226a    mysqld.exe!?do_command@@YA_NPEAVTHD@@@Z()
      7ff732809634    mysqld.exe!handle_connection()
      7ff73321ad82    mysqld.exe!?reserve@?$vector@EV?$allocator@E@std@@@std@@QEAAX_K@Z()
      7ff732f446fb    mysqld.exe!my_thread_once()
      7ff7332db39f    mysqld.exe!my_wildcmp_mb()
      7ff7332db5ea    mysqld.exe!my_wildcmp_mb()
      7ffbba278102    KERNEL32.DLL!BaseThreadInitThunk()
      7ffbbc39c2e4    ntdll.dll!RtlUserThreadStart()
      Trying to get some variables.
      Some pointers may be invalid and cause the dump to abort.
      Query (28a9c013738): SELECT * FROM fulltable
      Connection ID (thread ID): 7
      Status: NOT_KILLED
      The 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.
2015-12-27 01:19:31 - Checking server status...
2015-12-27 01:19:31 - Trying to connect to MySQL...
2015-12-27 01:19:31 - Can't connect to MySQL server on '127.0.0.1' (10061) (2003)
2015-12-27 01:19:31 - Assuming server is not running

我正在处理的项目只是从这里克隆https://github.com/StretchProjects/stretch-league,所以你可以查看这段代码。我是PHP的新手,所以我无法对此进行调试并追踪这些错误。

1 个答案:

答案 0 :(得分:0)

我不得不将MySQL升级到版本5.7.10,现在一切正常。