Page 1 of 1

MySQL lost db permissions

Posted: Fri Mar 11, 2011 9:43 pm
by Troy McClure
I'm not sure what happened exactly, but all my db permissions have been lost. It happened when I was creating a new db in the plesk interface. All the info is still in the psa db, but the db and user tables in the mysql db have been cleaned out pretty much. I checked my backups from last week and they have the same problem, so I can't restore them. I'm not really sure how it was still working, but when I tried to add a db in the plesk interface, everything stopped. I had to manually re-add the admin account into the mysql db. Is there any way to have plesk rewrite those permissions to the mysql db without overwriting the dbs themselves. The dbs are there and all the info is in them, just the users that were setup with plesk have been removed from the mysql db. I know I can manually fix this one by one, but is there an easy way to do it using any plesk commands? I have a decent amount of dbs and it would take quite a while to manually reconfigure all of them.

Re: MySQL lost db permissions

Posted: Sat Mar 12, 2011 4:46 pm
by scott
Any chance that got backed up to /var/lib/psa?

Re: MySQL lost db permissions

Posted: Sat Mar 12, 2011 6:20 pm
by Troy McClure
I did find a mysql dump from November that was a pre-upgrade dump. I was able to restore from that file to get most of them. I did have to remove some records in the user table that had blank user or blank password. Thanks.