0

I have a database that is creating loads of orphaned tables and the hash at the beginning #sql-whatever is causing MySql to crash. This has started happening weekly so I've created a cron job to remove the files every 5 minutes as a band-aid fix.

How can I find the root cause of this issue?

CMS: Drupal 7

Server Setup:

  • Apache: 2.4.34
  • PHP: 5.6.37
  • MySQL: 5.6.39
  • Perl: 5.26.0
Brad O
  • 43
  • 5
  • 1
    Have you checked the server log? Could be under /var/log/mysql (on Linux at least). You may also want to take a look at https://dev.mysql.com/doc/refman/5.6/en/forcing-innodb-recovery.html. – Tano Fotang Sep 30 '18 at 17:01
  • I don't have any MySql logs which is why I'm at such a loss. InnoDB recovery will definitely help. – Brad O Sep 30 '18 at 19:18
  • 1
    The logging could be disabled. Check this question for a guide on how to enable it: https://stackoverflow.com/questions/5441972/how-to-see-log-files-in-mysql. You may then in the logs find pointers to the root cause of your problem. – Tano Fotang Sep 30 '18 at 20:09

1 Answers1

1

This usually happens when InnoDB is interrupted when performing an ALTER TABLE command. You should not remove the files themselves but rather perform a DROP TABLE on the table(s) in question.

To determine the actual root cause of the issue we would need quite a bit more information such as what app / software / framework etc. are you using.

cherrysoft
  • 1,165
  • 8
  • 17