mysql innodb不断被破坏

时间:2016-01-14 00:31:01

标签: php mysql innodb

我在Mac OS上有一个mysql数据库。有一个表有700000行和一个blob列。我使用mysql workbench 6.3(来自XAMPP)。

我有一个sql脚本,只是简单地更新我的表:

更新TABLE集X = Y,其中P = 1

脚本长约100,000行,每行都是上面的形式。例如

update TABLE set BLOB_COLUMN='Y' where P=1
update TABLE set BLOB_COLUMN='YA' where P=2
update TABLE set BLOB_COLUMN='SY' where P=3
update TABLE set BLOB_COLUMN='YC' where P=4
etc etc

我使用“source filename.sql”命令来运行我的脚本。

我的问题是,在某一行上没有失败,进程失败并使我的数据库损坏 - 然后我必须将其丢弃并从备份中恢复。确切的输出如下。

我做了一个innodbcheck,它告诉我一切都很好。

是的,它告诉我下面的行号,我可以删除该行,但是以后可能会有更多行可能导致相同的错误。

有人知道请问有什么事吗?

由于

Query OK, 1 row affected (0.00 sec)
Rows matched: 1  Changed: 1  Warnings: 0

Query OK, 1 row affected (0.00 sec)
Rows matched: 1  Changed: 1  Warnings: 0

ERROR 2013 (HY000) at line 8021 in file: '1.sql': Lost connection to MySQL server during query
ERROR 2006 (HY000) at line 8022 in file: '1.sql': MySQL server has gone away
No connection. Trying to reconnect...
ERROR 2002 (HY000) at line 8022 in file: '1.sql': Can't connect to local MySQL server through socket '/Applications/XAMPP/xamppfiles/var/mysql/mysql.sock' (61 "Connection refused")
ERROR at line 8022 in file: '1.sql': Can't connect to the server

No connection. Trying to reconnect...
ERROR 2002 (HY000) at line 8023 in file: '1.sql': Can't connect to local MySQL server through socket '/Applications/XAMPP/xamppfiles/var/mysql/mysql.sock' (61 "Connection refused")
ERROR at line 8023 in file: '1.sql': Can't connect to the server

No connection. Trying to reconnect...
ERROR 2002 (HY000) at line 8024 in file: '1.sql': Can't connect to local MySQL server through socket '/Applications/XAMPP/xamppfiles/var/mysql/mysql.sock' (61 "Connection refused")
ERROR at line 8024 in file: '1.sql': Can't connect to the server

0 个答案:

没有答案