6.3. Backing Up Databases in MySQL
In order to make a backup of your Campsite database, do the following:
type: mysqldump -u <db_user> -p <password> campsite > yourname-db.sql
In order to delete your Campsite database from MySQL, do the following:
type: mysqladmin -u <db_user> -p <password> drop campsite
confirm with 'y'
In order to load your backed up Campsite database, do the following:
create the Campsite database by typing: mysqladmin -u <db_user> -p <password> create campsite
edit the backup file you created and add the first line: use campsite;
(make sure you finish the line with a semicolon and do not start the line with a hash, which would mean it is only a comment).
load the database by typing: mysql -u <db_user> -p <password> campsite < yourname-db.sql
add a note
User Contributed Notes
6.3. Backing Up Databases in MySQL
There are no user contributed notes for this page.