MySQL Forums
Forum List  »  General

How To Remove Zombie Databases from INFORMATION_SCHEMA 5.7.29
Posted by: Hanft Matthias
Date: March 15, 2020 06:41AM


after a database was deleted from the file system (don't ask why and how - long story...), everything works still flawlessly - except when the server starts, it writes to the error log file that it can't find the database files:

2020-03-15T12:21:22.490846Z 0 [ERROR] InnoDB: Cannot open datafile for read-only: './Mand3/synewnumber.ibd' OS error: 71
2020-03-15T12:21:22.490848Z 0 [ERROR] InnoDB: Operating system error number 2 in a file operation.
2020-03-15T12:21:22.490850Z 0 [ERROR] InnoDB: The error means the system cannot find the path specified.
2020-03-15T12:21:22.490852Z 0 [ERROR] InnoDB: If you are installing InnoDB, remember that you must create directories yourself, InnoDB does not create them.

While I could obviously just ignore all those messages, I'd feel better without them. I have found out that the filenames are still in the INFORMATION_SCHEMA database. Searching the web found many links to things like "repair corrupt tables" and all that, but what I'd really need would be something like "repair INFORMATION_SCHEMA on the basis of the still existent databases". One hint I had found was to delete /var/lib/mysql/ib* (so that they are recreated automatically at server start), but that makes existing databases - including the mysql database - unusable because of some *.frm issues (didn't completely understand the message; deleting the *.frm files didn't help either).

While everything works fine at the moment (except those error messages at startup), I'd like to eliminate this problem before I move to 8.0. Any hints?



Options: ReplyQuote

Written By
How To Remove Zombie Databases from INFORMATION_SCHEMA 5.7.29
March 15, 2020 06:41AM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.