0

I test Drupal websites on my site locally on Mac using Phpmyadmin.

I recently had to to do a clean reinstall of my Mac. I have a full back up of my hardrive, but I'm not sure where to locate the databases in the back up and how to restore them.

Where does Phpmyadmin store the databases?

big_smile
  • 1,487
  • 4
  • 26
  • 59

2 Answers2

1

/usr/local/mysql/data

try it here

Mik
  • 1,705
  • 1
  • 14
  • 26
0

phpMyAdmin does not write any database files. It is a php client application which accesses a MySQL server.

On OSX the MySQL server creates its data files in /usr/local/mysql/data as far as I know.

1. Stop your MySQL server

sudo /usr/local/bin/mysql.server stop

2. Remove new data files

sudo mv /usr/local/mysql/data /usr/local/mysql/data.new

3. Copy old data files from your backup and fix prrmissions

sudo chown -R _mysql:wheel /usr/local/mysql/data

4. Start your server again

sudo /usr/local/bin/mysql.server start

5. Check and optimize databases

sudo /usr/local/mysql/bin/mysqlcheck --all-databases

Now phpMyAdmin will show all old databases

Michel Feldheim
  • 17,625
  • 5
  • 60
  • 77