[英]Mysql Error #2002 No Connection made.
I know previously several question had been posted on this topic. 我知道以前有几个关于此主题的问题。 But mine is a bit difference.
但是我的有点不同。 I already tried all the previous solution.
我已经尝试过所有以前的解决方案。 What happened is whenever I try to select data from a specific table mysql crashes.
发生的事情是,每当我尝试从特定表中选择数据时,mysql崩溃。 I do work fine on all other tables but whenever I select data from that specific table it crashes even from command line.
我在所有其他表上都能正常工作,但是每当我从该特定表中选择数据时,它甚至会从命令行崩溃。 Now I am unable to mysqldump the database and also cant drop the table as it contains valuable data.
现在,我无法mysqldump数据库,也不能删除表,因为它包含有价值的数据。 Please suggest some options.
请提出一些选择。
Use mysqlcheck
to check specific table in db. 使用
mysqlcheck
检查db中的特定表。
mysqlcheck -c db_name tbl_name -u root -p
provide password and it will tell you whether your table is corrupted or not. 提供密码,它将告诉您您的表是否损坏。
Then you can use following command to repair table 然后可以使用以下命令修复表
mysqlcheck -r db_name tbl_name -u root -p
mysqlcheck work with MyISAM
and archive
tables. mysqlcheck与
MyISAM
和archive
表一起使用。
After several attempts and various suggestions from you guys I finally find a somewhat solution. 经过大家的几次尝试和各种建议,我终于找到了某种解决方案。 It is true that the specific table was corrupted.
确实,特定表已损坏。 And all other above mentioned options failed.
上述所有其他选项均失败。 So, I executed a query with limiting my results to 0, 100 and it works fine.
因此,我执行了一个查询,将结果限制为0、100,并且工作正常。 Then I dump that data by using that query with mysqldump.
然后我通过将查询与mysqldump一起使用来转储数据。 I keep on going and changed the limit from 100, 200 and so on.
我继续前进,并将限制从100、200等更改。 Whenever I get error I simply skipped few rows.
每当出现错误时,我都会跳过几行。 At last I had recovered almot 95% of my data which is not bad.
最终,我恢复了almot 95%的数据,这还不错。 Thanks guys for all your support.
谢谢大家的支持。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.