I am using digitalocean VPS. Accidentally I changed all files' ownership to www-data on my server. How can I get my mysql database copy from this server?
Asked
Active
Viewed 138 times
-1
-
All files? As in you did a `chown` on `/`? If so, MySQL isn't going to be the only thing that's affected. SSH probably won't let you back in, so don't log out... – ceejayoz Aug 26 '16 at 17:17
-
SSH is not affected. I checked all files is changes but I can login with ssh. – Ayxan Emiraslanli Aug 26 '16 at 19:29
2 Answers
2
No backups? MySQL files should be in /var/lib/mysql or /var/db/mysql... look around, you may be able to change the ownership of those files and get mysql to start again, dump the db and start anew on another machine.

Stefano Maffulli
- 500
- 3
- 8
0
I created a new vps with digitalocean and installed mysql. Then copied file permissions and owners from new vps to old vps. Mysql worked again on old machine!

Ayxan Emiraslanli
- 87
- 10