Database files gone

Noobie to Local but have been using successfully for a while with 3 or 4 sites. Running 2.0.4. Went to open one of them that has been working fine and got a “Error in establishing database connection”. All .sql files are apparently missing from the site folder. Not in /app, not in /sql. Have stopped and restarted Local, machine. Used SSH "service mysql restart " and got
[ ok ] Stopping MySQL database server: mysqld.
[…] Starting MySQL database server: mysqld . . . . . . . . . . . . . . . . . [FAIL . . . . . . . . . . failed!

All other sites are working fine. Are the database files restorable somehow?

Hi James,

So sorry for the trouble!

Do these sites have large databases?

Also, do you see any errors in MySQL logs in the logs folder for that site?

Thanks for your response. The databases were quite small as I’d only made it through 4 pages of the site build out. I do see quite a few errors in the logs, but I would expect corrupt db files as a result not .sql files to disappear altogether, especially if the site’s been active, started and stopped several times without problems. I’ve since rebuilt the site from scratch on a new installation and am making regular backups of the app/sql folder.

The files in app/sql are backups and not used for anything outside of just having the SQL backed up.

My guess is that mydumper is failing and since the app/sql file is cleared out prior to mydumper running it results in an empty app/sql folder.

What were the errors in the MySQL log file(s)?

Here’s a popular example:

170623 23:04:02 InnoDB: Error: page 433 log sequence number 231836972
InnoDB: is in the future! Current system log sequence number 231799889.
InnoDB: Your database may be corrupt or you may have copied the InnoDB
InnoDB: tablespace but not the InnoDB log files. See
InnoDB: http://dev.mysql.com/doc/refman/5.5/en/forcing-innodb-recovery.html
InnoDB: for more information.

I went back in Time machine and recovered the .sql file backups and restored them to the /app/sql folder. Still can’t establish a database connection, though.