开发者

How to recover Mysql database from backup files

开发者 https://www.devze.com 2023-01-20 12:02 出处:网络
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 provi

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开发者_Go百科 all the files.

Is there a way I can recover my data?


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消