mysql数据库备份还原_从备份文件还原MySQL数据库
mysql数据库备份还原
There are many reasons you would want to restore a database from a backup file… But you should also test this on a test server just to make sure that your database backups are working correctly. Here’s the syntax:
有很多原因需要从备份文件还原数据库……但是您也应该在测试服务器上对此进行测试,以确保数据库备份正常运行。 语法如下:
mysql -h hostname -u username -pthepassword databasename < dumpfile.sql
mysql -h主机名-u用户名-pthepassword数据库名<dumpfile.sql
Here’s an example:
这是一个例子:
mysql -h localhost -u root -p72aDufi8 db01 < thedumpfile.sql
mysql -h本地主机-u根-p72aDufi8 db01 <thedumpfile.sql
翻译自: https://www.howtogeek.com/howto/mysql/restore-mysql-database-from-a-backup-file/
mysql数据库备份还原