-1

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?

  • 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 Answers2

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.

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!