UNLOCK THE SECRET TO AUTOMATICALLY BACK UP AND RESTORE YOUR MySQL DATABASE WITH COMMAND PROMPT
HTML-код
- Опубликовано: 12 сен 2024
- Auto Backup and Restore of MYSQL Database using Command Prompt.
How to auto backup MySQL database using batch script.
You can create your own schedule database backup like- after every 1 hour a new backup will be generated. Backup filename will be present date & time. So no need to worry about data loss.
Create your own restore batch file that once clicked will restore the database.
I will add the code on comment box as description is not accepting it.
Back Up and Restore MySQL Databases Using MySQL Workbench
• Back Up and Restore My...
Basic SQL Tutorial For Beginners In 10 minutes | Creating and Manipulating Databases
• Basic SQL Tutorial For...
Thanks for this. It's of great help to me.
Glad it was helpful!
For Restore
cd "C:\Program Files\MySQL\MySQL Server 5.7\bin"
mysql -hlocalhost -uroot -proot worldbackup < "C:\Users\uniqu\OneDrive\Desktop\AutomaticBackup\world_backup.sql"
Very good explanation sir
For Backup use this script
cd "C:\Program Files\MySQL\MySQL Server 5.7\bin"
mysqldump -hlocalhost -uroot -proot world > "C:\Users\uniqu\OneDrive\Desktop\AutomaticBackup\world_backup_%date:~-10,2%-%date:~-7,2%-%date:~-4,4%-%time:~0,2%_%time:~3,2%_%time:~6,2%.sql"