mysql DUMB
28 November, 2007
Here the mysql dump and restore commands with username, password and database name.
Change user and password and dbname and filename according to you needs! Note that if you write down or type in your passphrase you may be at risk if someone observes this. If you leave out password behind the -p mysql will prompt you for it and it will not be displayed as you type it in. This may be more secure.
- dump the database dbname to filename
mysqldump -uuser -ppassword dbname > filename - dump the database dbname to filename and add ‘drop table if exists’ to DDL (dangerous for existing data)
mysqldump –add-drop-table -uuser -ppassword dbname > filename - restore the dump in filename to the database dbname
mysql -uuser -ppassword dbname < filename
(note: in this example username is user and password is password)
http://www.devshed.com/c/a/MySQL/Backing-up-and-restoring-your-MySQL-Database/2/
As always I am not responsible for any damage