Mysql 表正在添加行本身 [英] Mysql table is adding rows itself

查看:38
本文介绍了Mysql 表正在添加行本身的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

简短的故事:我在一个循环中编写了一个代码,将行插入到 mysql 表中,并且不小心让它运行了 3 个小时.我试图清空 mysql 表,但它又自动开始插入行.我什至试图删除并重新创建它,但它会自动插入行(id 按递增顺序)

Short Story: I wrote a code in a loop that insert rows into mysql table, and kept it running for 3 hours accidentally. I tried to empty the mysql table, but then again it automatically starts to insert rows. I even tried to drop and re-create it, but it is automatically inserting rows (id in increasing order)

完整故事:

2 天前,我写了一个代码,使用 API 并将数据插入 mysql 表(在循环中).为了确保添加了多少条记录,我创建了一个名为lastrequestdone"的表,并在每条记录插入成功后开始插入 id 编号.

2 days ago, I wrote a code that use an API and insert the data into mysql table (in a loop). And to mesure, how many records I have added, I made an table named "lastrequestdone" and started to insert the id number after every record inserted successfully.

但是代码在 1 小时内插入了所有 ID,之后 API 开始给出 error:404 响应,并且循环开始运行得非常快.

But the code inserted all the ID's in 1 hour, and after that, the API started to give error:404 response, and the loop started to run very fast.

因此假设,我运行了 3 个小时的循环,按递增顺序插入 id.但是一旦我意识到这一点,我就停止了循环.试图清空表格,但每当我清空表格时,就会自动开始插入更多行.

So assume that, I ran a loop for 3 hours, that insert an id in increasing order. But once i realized it, I stopped the loop. Tried to empty the table, but whenever I empty the table, more rows automatically starts to get inserted.

然后我放下了表,今天又重新创建了它,但同样的事情正在发生.行正在自动插入.

Then i dropped the table, and created it again today, but the same thing is happening. Rows are getting inserted automatically.

推荐答案

使用任何 UI 工具(例如 MySQL Workbench 或类似工具)在 MySQL 服务器中查找进程并尝试找到您离开的查询进程并停止该特定进程.您可能应该通过这种方式解决它.

Look for the processes in your MySQL Server using any UI tools like MySQL Workbench or likes of it and try to find the process of the query that you left running and stop that particular process. You should probably resolve it this way.

这篇关于Mysql 表正在添加行本身的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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