简体   繁体   中英

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. 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. Please suggest some options.

Use mysqlcheck to check specific table in 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.

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. Then I dump that data by using that query with mysqldump. I keep on going and changed the limit from 100, 200 and so on. Whenever I get error I simply skipped few rows. At last I had recovered almot 95% of my data which is not bad. Thanks guys for all your support.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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