Need help. Website down - Database problems

Re: Need help. Website down - Database problems

by Leon Stringer -
Number of replies: 0
Picture of Core developers Picture of Particularly helpful Moodlers

I don't know MySQL on macOS, but presumably it's similar to Linux and Microsoft Windows.

Are you saying you don't have a backup (dump file) of the database from before the outage, e.g. a nightly backup? Is this a production site?

What exactly did you copy into the MySQL folder? There isn't a single data file, there's a folder for each database and each folder will have one or two files per table, a .frm file and a .idb file, e.g. about 800 files in total for a Moodle database:

mdl_analytics_indicator_calc.frm
mdl_analytics_indicator_calc.ibd
mdl_analytics_models.frm
mdl_analytics_models.ibd
mdl_analytics_models_log.frm
mdl_analytics_models_log.ibd

Then there's the folders for the database transaction logs (e.g. ib_logfile0) and the system databases, e.g. system database 'mysql':

columns_priv.frm
columns_priv.MYD
columns_priv.MYI
column_stats.frm
column_stats.MYD
column_stats.MYI

You'll need to find the MySQL log file as this should report the problem preventing it from starting. You can share the relevant log entries here and we can try to help (if there are lots of entries attach them as a file). I don't know where the MySQL log file is on macOS.