Alexis King
Alexis King

Reputation: 43872

Move MySQL database from Linux to Mac?

I have an existing MySQL database on a Linux computer, and I need to temporarily transfer it to a computer running Mac OS X. It's a fairly small database, so it shouldn't be too hard to do, I just need to know what I need to move.

What steps do I need to take to move my data from the Linux computer to the Mac one?

Upvotes: 0

Views: 614

Answers (1)

Marc B
Marc B

Reputation: 360782

Use mysqldump to export to a file, move that file to the new machine, then use mysql to load it in, e.g.

$ mysqldump -p -u username > dump.sql

then

$ mysql -p -u newusername < dump.sql

Upvotes: 3

Related Questions