从外部删除mysql中的表 [英] drop table in mysql from outside

查看:68
本文介绍了从外部删除mysql中的表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在运行计划不当的脚本后,我无法让 Windows 7 打开 MySQL 服务(错误 1053),该脚本运行了 24 小时但没有完成.该脚本只是将行插入到表 some_table_name 中.我正在尝试各种方法让 Windows 7 启动服务,但我想问题可能包括在脚本运行时添加到 some_table_name 的 7000 万行数据.有人可以告诉我如何在 MySQL 未作为 Windows 7 服务运行的情况下执行此操作吗?这是我希望数据库执行的命令:

I am not able to get Windows 7 to open the MySQL service (error 1053) after running a poorly planned script which ran for 24 hours without completing. The script simply inserted rows into a table some_table_name. I am trying various ways of getting windows 7 to start the service, but I imagine the problem might include the 70 million rows of data that were added to some_table_name while the script was running. Can someone show me how to do this under the conditions when MySQL is not running as a windows 7 service? Here is the command that I want the database to execute:

use my_dbase_name;
drop table some_table_name;

推荐答案

如果您有办法,请尝试在另一台机器上运行该服务,然后重新创建架构.然后在您的数据库的数据目录下,您应该找到与您的数据库中的每个表相关的文件,也可能带有索引.您也许可以从您的干净"实例中用一个不包含行的好文件替换坏的、损坏的文件(提示 - 这将是大文件;).

If you have the means, try running the service on another machine, then re-create the schema. Then under the data directory for your DB, you should find files pertaining to each table in your DB, possibly with indexes, too. You might be able to replace the bad, corrupt file (hint - it will be the big one ;) with a good one containing no rows, from your 'clean' instance.

这篇关于从外部删除mysql中的表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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