Stuff I'll forget if I don't write it down
Monday, 6 December 2010
Dumping and restoring mysql db's
Dump a db with:
mysqldump -h<host-name-or-ip> -u<username> -p<password> <database-name> > dump.sql
To import, first create the target db, then import the dump with:
mysql -h<host-name-or-ip> -u<username> -p<password> <database-name> < dump.sql
Yep, its that easy.
No comments:
Post a Comment
‹
›
Home
View web version
No comments:
Post a Comment