MySQL lost db permissions

General Discussion of atomic repo and development projects.

Ask for help here with anything else not covered by other forums.
Troy McClure
Forum Regular
Forum Regular
Posts: 196
Joined: Tue May 10, 2005 1:24 pm

MySQL lost db permissions

Unread post 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.
scott
Atomicorp Staff - Site Admin
Atomicorp Staff - Site Admin
Posts: 8355
Joined: Wed Dec 31, 1969 8:00 pm
Location: earth
Contact:

Re: MySQL lost db permissions

Unread post by scott »

Any chance that got backed up to /var/lib/psa?
Troy McClure
Forum Regular
Forum Regular
Posts: 196
Joined: Tue May 10, 2005 1:24 pm

Re: MySQL lost db permissions

Unread post 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.
Post Reply