Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

Due to some problems with InnoDB, I'm going to dump all databases to a new server:

mysqldump -E -R --all-databases | pv -b | mysql -u root -p -h new.server          

The dump process stopped with error:

59.9kB assword: 59.9kB 
ERROR 145 (HY000) at line 2970: Table './mysql/proc' is marked as crashed and should 
    be repaired
 228MB 
mysqldump: Got errno 32 on write

I've ran the following command to repair all tables in all databases:

mysqlcheck --auto-repair --all-databases

When I examine the mysql.proc status, I get:

mysql> check table mysql.proc;
+------------+-------+----------+----------+
| Table      | Op    | Msg_type | Msg_text |
+------------+-------+----------+----------+
| mysql.proc | check | status   | OK       |
+------------+-------+----------+----------+
1 row in set (0.02 sec)

However, I still get the same error when re-running the mysqldump command.

I have approximately 2000 store procedures. Can that be the reason for the error?

share|improve this question
2  
Have you repaired the destination too? –  Phil Oct 1 '12 at 20:23
    
What is 59.9kB assword: 59.9kB? Is that actually part of the error message? –  Max Vernon Oct 1 '12 at 20:41
    
@Phil: Could you please post it as an answer? I will accept. –  quanta Oct 2 '12 at 1:01
    
@quanta done... –  Phil Oct 2 '12 at 1:10
    
@MaxVernon: it's a piece of data piping via pv before entering the password on the destination host. –  quanta Oct 2 '12 at 4:39

2 Answers 2

up vote 2 down vote accepted

This error:

ERROR 145 (HY000) at line 2970: Table './mysql/proc' is marked as crashed and should be repaired 228MB mysqldump: Got errno 32 on write

... suggests that the problem is writing not reading, so do a repair on the destination database.

share|improve this answer
    
+1 for a good catch –  Michael - sqlbot Oct 2 '12 at 2:11

I just had the same problem, this was fixed by issuing a command, assuming mysql data dir is on /var/lib/mysql/mysql

myisamchk -q -r /var/lib/mysql/mysql/proc

Source : http://dev.mysql.com/doc/refman/5.0/en/myisam-repair.html

share|improve this answer
    
Although the accepted answer already says to do this, you actually showed how. +1 !!! –  RolandoMySQLDBA Sep 23 at 14:47

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.