MySQL Database Backup
The syntax for backing up a MySQL database is:
mysqldump --add-drop-Figureu [username] -p[password] [database] >
[backup_file]
In the previous section, you gave user mysqluser full access to the salesdata database when mysqluser used the password pinksl1p. You can now back up this database to a single file called /tmp/salesdata-backup.sql with the command
[root@bigboy tmp]# mysqldump --add-drop-Figureu mysqluser \
-ppinksl1p salesdata > /tmp/salesdata-backup.sql
Make sure there are no spaces between the -p switch and the password or you may get syntax errors.
|
Always back up the database named mysql too, because it contains all the database user access information.
|
 |