当前位置:网站首页>Mysql database backup and recovery -- mysqldump command

Mysql database backup and recovery -- mysqldump command

2022-07-04 23:14:00 Zuo Mingshui

1. Backup and recovery of database
1) Back up the specified database
mysqldump -u root -p test > ./test.dump
2) Back up all libraries
mysqldump -u root -p --all-databases > ./all.dump
3) Restore all libraries
mysql -u root -p < ./all.dump
4) Restore the specified database
mysql -u root -p test <./test.dump


Be careful : To restore the specified database , In fact, it is to restore all tables under the database . therefore , The database must exist

原网站

版权声明
本文为[Zuo Mingshui]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/185/202207042244277833.html