Click to See Complete Forum and Search --> : newbie with mysql problem


Anon
03-11-2002, 12:25 PM
Hi,

I have a problem with my mysql server running on a mandrake 8.1 machine. I accidentally changed a setting under webmin (user permissions) I changed localhost to all. And now i cant get in at all. And setting it back is also impossible cause i get the message "Access denied for user: '@localhost' to database 'mysql'"

How can i change a standard privileges back? Or is the only solution to install the whole machine from scratch?

Hope someone knows how to solve this.

Yours thankfully,

Kee

Anon
03-11-2002, 01:51 PM
Kee,

Generally (unless you've put entries into the host table), your security entries will be held in 2 tables in the mysql database.

a. User
b. Db

Easy solution: (if you have a backup)
1. shutdown mysql.
2. Overwrite the files db.* and user.* in the mysql directory from the backup.
3. Restart mysql.

If you don't have a backup, drop me a mail and I'll send you a copy of these files with blank passworded root user entries.

Once you've got it working, it's definitely worth scheduling a nightly shutdown and backup of you database files (cron et al.)

Cheers

Justin