Allan Thomas
Allan Thomas

Reputation: 3609

Migrating MySQL databases from files only

On a fresh install of MySQL on Mavericks (via Homebrew if that matters) how can I take database files from a back up and migrate them to /usr/local/var/mysql in the new instance? I have a directory for each database and one huge ibdata1 file.

If I move them by a simple file transfer, start the new instance and log in, each database is there however no data is present when I check a table.

Upvotes: 0

Views: 76

Answers (1)

koriander
koriander

Reputation: 3258

it should work if keeping or upgrading server version. Make sure ownership and permissions are correct. Then run mysql_upgrade which will adjust the files.

Upvotes: 1

Related Questions