Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/database/9.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
MYSQL-查询期间与MYSQL服务器的连接中断_Mysql_Database_Phpmyadmin_Innodb - Fatal编程技术网

MYSQL-查询期间与MYSQL服务器的连接中断

MYSQL-查询期间与MYSQL服务器的连接中断,mysql,database,phpmyadmin,innodb,Mysql,Database,Phpmyadmin,Innodb,今天我试图导入一个~650MB的数据库,但由于最大数据包大小太小,导入失败。。在尝试修复此问题时,由于某种原因,数据库已损坏 现在我有以下问题: 在PhpMyAdmin中,我尝试删除已损坏的表,它返回以下内容: Fout SQL-query: DROP DATABASE `database_name` MySQL retourneerde: #2013 - Lost connection to MySQL server during query 除此之外,其他所有数据库都运行良好

今天我试图导入一个~650MB的数据库,但由于最大数据包大小太小,导入失败。。在尝试修复此问题时,由于某种原因,数据库已损坏

现在我有以下问题:

在PhpMyAdmin中,我尝试删除已损坏的表,它返回以下内容:

Fout
SQL-query: 

DROP DATABASE  `database_name`

MySQL retourneerde: 

#2013 - Lost connection to MySQL server during query 
除此之外,其他所有数据库都运行良好。 我尝试了几种方法,甚至在我的.cnf文件中将innodb_force_recovery设置为6

有人经历过这样的事情吗

完整错误输出为:

Markering - 27 nov. 2012 16:49:06
121127 16:49:18  InnoDB: Assertion failure in thread 4516245504 in file dict0dict.c line 2643
InnoDB: Failing assertion: for_table || ref_table
InnoDB: We intentionally generate a memory trap.
InnoDB: Submit a detailed bug report to http://bugs.mysql.com.
InnoDB: If you get repeated assertion failures or crashes, even
InnoDB: immediately after the mysqld startup, there may be
InnoDB: corruption in the InnoDB tablespace. Please refer to
InnoDB: http://dev.mysql.com/doc/refman/5.5/en/forcing-innodb-recovery.html
InnoDB: about forcing recovery.
15:49:18 UTC - mysqld got signal 6 ;
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=16777216
read_buffer_size=262144
max_used_connections=1
max_threads=151
thread_count=1
connection_count=1
It is possible that mysqld could use up to 
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 134066 K  bytes of memory
Hope that's ok; if not, decrease some variables in the equation.

Thread pointer: 0x1010c9000
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...
stack_bottom = 10d306ed8 thread_stack 0x40000
0   mysqld                              0x000000010027a4fc my_print_stacktrace + 44�
1   mysqld                              0x0000000100021134 handle_fatal_signal + 692�
2   libsystem_c.dylib                   0x00007fff836038ea _sigtramp + 26�
3   mysqld                              0x00000001002efd87 mtr_memo_push + 23�
4   libsystem_c.dylib                   0x00007fff8365adce abort + 143�
5   mysqld                              0x00000001002baf96 dict_foreign_add_to_cache + 998�
6   mysqld                              0x00000001002c09c6 dict_load_foreigns + 1414�
7   mysqld                              0x00000001002c2b5b dict_load_table + 1707�
8   mysqld                              0x00000001003212b1 row_drop_database_for_mysql + 129�
9   mysqld                              0x000000010030b322 _ZL22innobase_drop_databaseP10handlertonPc + 226�
10  mysqld                              0x0000000100022601 _ZL17dropdb_handlertonP3THDP13st_plugin_intPv + 33�
11  mysqld                              0x0000000100178f7d _Z24plugin_foreach_with_maskP3THDPFcS0_P13st_plugin_intPvEijS3_ + 845�
12  mysqld                              0x0000000100140de3 _Z11mysql_rm_dbP3THDPcbb + 1859�
13  mysqld                              0x0000000100167143 _Z21mysql_execute_commandP3THD + 13491�
14  mysqld                              0x000000010016a386 _Z11mysql_parseP3THDPcjP12Parser_state + 294�
15  mysqld                              0x000000010016b49d _Z16dispatch_command19enum_server_commandP3THDPcj + 1709�
16  mysqld                              0x000000010016c387 _Z10do_commandP3THD + 231�
17  mysqld                              0x000000010020b581 _Z24do_handle_one_connectionP3THD + 353�
18  mysqld                              0x000000010020b639 handle_one_connection + 73�
19  libsystem_c.dylib                   0x00007fff83615742 _pthread_start + 327�
20  libsystem_c.dylib                   0x00007fff83602181 thread_start + 13�

Trying to get some variables.
Some pointers may be invalid and cause the dump to abort.
Query (10e002810): is an invalid pointer
Connection ID (thread ID): 9
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.
121127 16:49:19 mysqld_safe mysqld restarted
121127 16:49:19 [Warning] Setting lower_case_table_names=2 because file system for /Library/Application Support/appsolute/MAMP PRO/db/mysql/ is case insensitive
121127 16:49:19 [Note] Plugin 'FEDERATED' is disabled.
121127 16:49:19 InnoDB: The InnoDB memory heap is disabled
121127 16:49:19 InnoDB: Mutexes and rw_locks use GCC atomic builtins
121127 16:49:19 InnoDB: Compressed tables use zlib 1.2.3
121127 16:49:19 InnoDB: Initializing buffer pool, size = 128.0M
121127 16:49:19 InnoDB: Completed initialization of buffer pool
121127 16:49:19 InnoDB: highest supported file format is Barracuda.
InnoDB: The user has set SRV_FORCE_NO_LOG_REDO on
InnoDB: Skipping log redo
121127 16:49:19  InnoDB: Waiting for the background threads to start
121127 16:49:20 InnoDB: 1.1.8 started; log sequence number 0
121127 16:49:20 InnoDB: !!! innodb_force_recovery is set to 6 !!!
121127 16:49:20 [Note] Event Scheduler: Loaded 0 events
121127 16:49:20 [Note] /Applications/MAMP/Library/bin/mysqld: ready for connections.
Version: '5.5.25'  socket: '/Applications/MAMP/tmp/mysql/mysql.sock'  port: 0  Source distribution

如果您尝试了每个innodb_force_恢复值,3停止回滚或转发事务,那么我只能指出以下几点

切中要害的是,这个网页上的人最终删除了innodb文件

直到最后,我还没有找到解决这个问题的明确方法……但是如果您在测试环境中,您可以删除ibdata1和ib_logfile0、ib_logfile1并重新启动服务器。这在我的情况下奏效了

显然,如果您有大量其他数据库,这将涉及到备份和恢复这些数据库。如果你有别的办法,我建议你先试试

Percona提供了一套数据恢复工具,但在您的情况下,数据不是问题所在


如果您尝试了每个innodb_force_恢复值,3停止回滚或转发事务,那么我只能指出以下几点

切中要害的是,这个网页上的人最终删除了innodb文件

直到最后,我还没有找到解决这个问题的明确方法……但是如果您在测试环境中,您可以删除ibdata1和ib_logfile0、ib_logfile1并重新启动服务器。这在我的情况下奏效了

显然,如果您有大量其他数据库,这将涉及到备份和恢复这些数据库。如果你有别的办法,我建议你先试试

Percona提供了一套数据恢复工具,但在您的情况下,数据不是问题所在


你可以删除或截断数据库中的单个表吗?我可以删除,截断每个表/数据库,针对特定的表/数据库除外。你可以删除或截断数据库中的单个表吗?我可以删除,截断每个表/数据库,针对特定的表/数据库除外。我也有同样的问题,删除ibdata1和日志文件对我来说很有效。可惜这对我来说不起作用。。现在我备份了我的重要数据库,并尝试了一个全新的开始。但我仍然有我的数据库??我备份了一些没有损坏的数据库,并进行了干净的安装。我也有同样的错误,但原因是另一个。只需删除MAMP/db/mysql/中的所有“ib”文件ib_logfile0、ib_logfile1、ibdata1,问题就解决了。我删除了文件并重新启动了MAMP服务器。在那之后,MAMP重新创建了ib文件,一切都像一个魔咒!我也遇到了同样的问题,删除ibdata1和日志文件对我来说很有效。可惜这对我来说不起作用。。现在我备份了我的重要数据库,并尝试了一个全新的开始。但我仍然有我的数据库??我备份了一些没有损坏的数据库,并进行了干净的安装。我也有同样的错误,但原因是另一个。只需删除MAMP/db/mysql/中的所有“ib”文件ib_logfile0、ib_logfile1、ibdata1,问题就解决了。我删除了文件并重新启动了MAMP服务器。在那之后,MAMP重新创建了ib文件,一切都像一个魔咒!