0

Using phpMyAdmin's "Copy Database" feature, I started copying one database with ~5M rows to another on the same server. About halfway through (2 hours or so) the server started crashing, and I had to kill the mysqld process.

MySQL is killing my server right now trying to roll back the tables that it had already started before I killed the process. It's been running for over 50 minutes now and slowing everything down.

Using show engine innodb status I was able to find the process no. Should I kill this process? Will it hurt my tables, or hurt anything, or is it safe to stop the rollback?

Here's the entry. At it's current rate, it looks like it'll take about 3 more hours to finish the 983k log entries left.

---TRANSACTION 0 1853619464, ACTIVE 3214 sec, process no 5552, OS thread id 3028249488 ROLLING BACK , undo log entries 983813

Luke Shaheen
  • 4,262
  • 12
  • 52
  • 82

1 Answers1

2

If you kill your rollback, it'll just do the rollback again the next time. It must complete the rollback to get the tables back to a consistent state.

Gary G
  • 5,692
  • 2
  • 27
  • 18
  • 2
    It actually looks like it'll take about 5 hours to finish rolling back. It may be less time to just restore the entire DB from a backup (done just a few hours prior). Can I kill the rollback and drop the database right away? – Luke Shaheen Nov 15 '12 at 16:00
  • 1
    I don't think that'll work. Do you have a backup of all databases on this server? If so, it'll be faster to kill mysqld and delete/reinitialize its data directory, then do a restore. – Gary G Nov 15 '12 at 16:07
  • Looks like the backup from yesterday never actually finished due to a collision with this copy, so we are just going to have it wait it out. Thanks! – Luke Shaheen Nov 15 '12 at 17:04