You don't even need mysqldump if you're moving a whole database schema, and you're willing to stop the first database (so it's consistent when being transfered)
- Stop the database (or lock it)
- Go to the directory where the mysql data files are.
- Transfer over the folder (and its contents) over to the new server's mysql data directory
- Start back up the database
- On the new server, issue a 'create database' command.'
- Re-create the users & grant permissions.
I can't remember if mysqldump handles users and permissions, or just the data ... but even if it does, this is way faster than doing a dump & running it. I'd only use that if I needed to dump a mysql database to then re-insert into some other RDBMS, if I needed to change storage options (innodb vs. myisam), or maybe if I was changing major versins of mysql (but I think I've done this between 4 & 5, though)
No comments:
Post a Comment