upgraded 6.2 and mysql lost all privileges

Dan Nelson dnelson at allantgroup.com
Tue Mar 6 22:11:29 UTC 2007

In the last episode (Mar 06), Noah said:
> okay you got me on the right track.
> I can see mysql files in that directory.  but mysql is not aware of the 
> users in the "user files"
> is there something that I need to tell to mysql to use those files to 
> reincorporate the mysql related users?
> # ls -l /var/db/mysql/mysql
> total 648
> -rw-rw----  1 mysql  mysql     208 Mar  6 06:49 user.MYD
> -rw-rw----  1 mysql  mysql    2048 Mar  6 06:49 user.MYI
> -rw-rw----  1 mysql  mysql   10330 Mar  6 06:49 user.frm

If you can log into mysql, does "select * from user" print anything?  A
208-byte MYD file is only large enough for about four user records.  If
you had 15 in there before, they're gone.  You'll probably want to
restore your entire /var/db/mysql/mysql/ directory from a backup, then
run mysql_fix_privilege_tables to bring the tables up to whatever
version of mysql you're now running.

	Dan Nelson
	dnelson at allantgroup.com

More information about the freebsd-questions mailing list