Where does Leopard Server's MySQL store its data?

pixelcort picture pixelcort · Jan 15, 2009 · Viewed 8.7k times · Source

I'm trying to recover a table in a MySQL database from Time Machine, however I don't know and can't find where Leopard Server's MySQL stores its data files.

  1. Does anyone know where they are stored?
  2. Is there an easy way to run mysqldump on them without restoring them?
  3. Is there anything else I should know about Time Machine and MySQL data file(s)?

Answer

MarkR picture MarkR · Jan 15, 2009

Connect to the database and issue

SHOW VARIABLES LIKE 'datadir';

Which will tell you the right answer even if it's been changed from the default.