简体   繁体   English

MySQL记录被删除,我不知道为什么

[英]MySQL records being deleted, and I don't know why

I have a serious problem of records being deleted automatically from a specific table in my MySQL database. 我有一个严重的问题,就是我的MySQL数据库中的特定表会自动删除记录。

After I figured that, I started to check the MySQL binary log to discover what was happening. 在我想到这一点之后,我开始检查MySQL二进制日志以发现发生了什么。

Seems that without standard appears DELETE commands, an example of the LOG transcribed below: 似乎没有标准出现DELETE命令,下面转录的LOG示例如下:

# at 454
#120605 15:37:48 server id 1 end_log_pos 570 Query thread_id=59 exec_time=0 error_code=0
SET TIMESTAMP=1338921468/*!*/;
DELETE FROM intranet_cadeira2 WHERE idCadeira='59'
/*!*/;
# at 570
#120605 15:40:15 server id 1 end_log_pos 686 Query thread_id=66 exec_time=0 error_code=0
SET TIMESTAMP=1338921615/*!*/;
DELETE FROM intranet_cadeira2 WHERE idCadeira='29'
/*!*/;

The data is inserted correctly, the procedure that inserts data in the tables is the following: 正确插入数据,在表中插入数据的过程如下:

BEGIN
INSERT INTO intranet_cadeira2 (idIntranet,titulo)
VALUES (pidIntranet,ptitulo);
COMMIT;
END

But after a while the records are deleted one by one. 但过了一会儿,记录会逐一删除。 I'm racking my brain for it, I appreciate if anyone can help! 我正在绞尽脑汁,如果有人能提供帮助,我感激不尽! I'm pretty sure that it's not a security problem. 我很确定这不是安全问题。

I don't think it is possible to see the cause from your codes. 我不认为可以从您的代码中查看原因。 However, I believe there is a timeout and delete. 但是,我相信有超时和删除。 And maybe once the files get expired, they get deleted from the records. 也许一旦文件过期,它们就会从记录中删除。

Also, is it in local server or not? 另外,它是否在本地服务器中?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM