如何修复Mysql Error 1160错误? [英] How Do I Fix Mysql Error 1160 Error?

查看:589
本文介绍了如何修复Mysql Error 1160错误?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好。

我收到了MySQL错误1160;写错了通讯包;

我有一个存储过程可以做到这一点:

步骤1:比较两个表中的数据并插入到tmp表中。

步骤2:然后将来自tmp表的结果复制到具有FEDERATED引擎的表中。此Federated表连接到另一台服务器上的另一个表。



我想知道上面的步骤1或2是否有任何错误可能导致此错误?错误并不总是弹出。偶尔它会弹出但是随机的。我也想知道这个错误是否会导致数据完整性问题或数据错误。

Hello.
I have received MySQL error 1160 ;error writing communication packets;.
I have a stored procedure that does this:
step 1: compares the data from two tables and insert into a tmp table.
step 2: Results from tmp table will then copied over to a table with FEDERATED engine. This Federated table is connected to another table on a different server.

I wish to know if there is anything wrong with step 1 or 2 from above that may cause this error? The error does not always pop up. Once in a while it will pop up but is random. I also wish to know if this error will cause major data integrity issue or errors in my data.

推荐答案

即使没有实际复制FEDERATED表,也可能发生问题(FEDERATED打开,但是包含使用任何repliate *或binlog * do / ignore选项排除的FEDERATED表的数据库。

我会尝试增加(暂时)你的net_read_timeout,net_write_timeout和max_allowed_pa​​cket变量。当重新加载mysqldump文件时,它通常是由其中一个引起的。

插入太多数据甚至会给你错误

尝试将max_allowed_pa​​cket设置为256M,你可以将它添加到/etc/my.cnf或my.ini

[mysqld]

max_allowed_pa​​cket = 256M



SET GLOBAL max_allowed_pa​​cket = 1024 * 1024 * 256;



另外我建议你阅读这个论坛上的评论:



http://www.filerepairforum.com/forum/databases/databases-aa/mysql/713-%E2%80%8Bhow-to-fix-a-corrupted-server-configuration-in-mysql [ ^ ]
Issue may happen even if FEDERATED tables are not actually replicated (FEDERATED turned ON, but database which contains FEDERATED tables excluded using any of the repliate* or binlog* do/ignore options).
I would try increasing (temporarily) your net_read_timeout, net_write_timeout, and max_allowed_packet variables. When reloading a mysqldump file dies, it's generally caused by one of those.
Inserting too many data can even give you the error
Try to set the max_allowed_packet to 256M, you can add it to /etc/my.cnf or my.ini
[mysqld]
max_allowed_packet=256M

SET GLOBAL max_allowed_packet = 1024 * 1024 * 256;

Also i recommend you to read comments on this forum:

http://www.filerepairforum.com/forum/databases/databases-aa/mysql/713-%E2%80%8Bhow-to-fix-a-corrupted-server-configuration-in-mysql[^]


这篇关于如何修复Mysql Error 1160错误?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆