Backup and Recovery in MySQL database
1. Create backup for single database. mysqldump -u root -p pankaj > /home/backup/ramjee.sql; 2. create backup for set utf8 character in single database. mysqldump -u root -p --default_character_set utf8 pankaj > /home/backup/ganga.sql 3.create backup for multiple database. mysqldump -u root -p --databases pankaj sys mysql > /home/backup/multidatabase.sql 4.create backup for all database. mysqldump -u root -p --all-databases > /home/backup/fulldatabase.sql 5.create backup for single table. mysqldump -u root -p pankaj emp > /home/backup/singletable.sql 6. how to create backup structure only. mysqldump -u root -p --no-data pankaj emp > structureonly.sql 7.how to backup data only. mysqldump -u root -p --no-create-db --no-create-info pankaj emp > /home/backup/dataonly.sql