How to recover Mysql database from backup files

孤人 提交于 2019-12-01 11:02:57

问题


I have using VPS that had to be re-imaged. my DB was part of it and it was being backup up as the app wasn't in production yet. However, there is some data that I wish to recover on it. the VPS provider is giving me a backup of the image (Ubunto Linux) that has all the files.

Is there a way I can recover my data?


回答1:


The mysql data files in Ubuntu are located at /var/lib/mysql

To restore your database you need:

1) create new database named as old one
2) stop mysql server
3) copy old database files from /var/lib/mysql/your_database_name/ to new system
4) start mysql server

Your database will be restored.



来源:https://stackoverflow.com/questions/3928063/how-to-recover-mysql-database-from-backup-files

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!