- 23 May 2025, 08:46
#6167
Here are the commands for your reference.
If you intend to backup the existing MySQL Database
mysqldump -u [user name] -p[password] [database name] > [dump file.sql]
If you have already backed up database and intend to restore into already existing database
mysql -u [user name] -p[password] [database name] < [dump file.sql]
ensure,
When you do the backup, use mysqldump and > symbol
When you do the restore, use mysql and < symbol
Thank you