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.
Introduction. Typically, MySQL will store data in the default directory of /var/lib/mysql.
Sure. But where it is depends on the package you have chosen to install MySQL. Have a look at this SO answer for different options. /usr/local/mysql/ and /usr/local/var/mysql/ are usual locations.
By default, the MySQL directories are installed under /usr/local/ . Even better, add /usr/local/mysql/bin to your PATH environment variable. You can do this by modifying the appropriate startup file for your shell.
The default data directory location is C:\Program Files\MySQL\MySQL Server 8.0\data , or C:\ProgramData\Mysql on Windows 7 and Windows Server 2008. The C:\ProgramData directory is hidden by default. You need to change your folder options to see the directory and contents.
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.
For my standard install (from a package) it was located in
/usr/local/mysql/data
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With