1

Looking for the best way to migrate a dozen or so MySQL databases from an old Mac mini to a new one. I've tried the source machine's phpMyAdmin (v. 4) EXPORT command, using what looked like reasonable options, and with all my existing databases selected. It created a 5+GB SQL file. Scanning through it, I see the "CREATE TABLE" commands but not any "CREATE DATABASE" commands. Am I doing it wrong?

2 Answers 2

0

The MySQL docs have explicit instructions for using mysqladmin and mysqldump to copy a database to another server. If all goes well it's a 2-line operation; better than trying to use phpMyAdmin. Took me a few tries to get server access permissions and user accounts/passwords sorted out, but eventually it worked. Oddly, I had problems with "server access denied" errors, and what appeared to fix them was erasing and retyping the user names in the (copied) command line, plus making sure the cursor was at the end of the command line before executing it. No idea what that's about.

-1

Thats how it is. All mine are the same. It allows you to import the tables (and data) into a different database.

If you are doing it once then its fine. This process is not recommended for large databases, because it becomes slower and bulkier.

1
  • Reading the MySQL docs, seems like mysqldump could be the way to go.
    – Rob Lewis
    Commented Jun 6, 2023 at 0:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.