Forum Moderators: open

Message Too Old, No Replies

mysql fix privilege tables

         

FiRe

9:39 am on Sep 20, 2007 (gmt 0)

10+ Year Member



Hi,

My apache recently screwed up after having using it for a long time. I installed it using a WAMP package called AppServ, which put php and MySQL 4.0.24 on my comp at the time. I have upgraded to the latest AppServ which puts MySQL 5.0.45 and apache now works fine, but it basically deleted all the data. Luckily I took a backup and copied the old "data" folder across to the new mysql folder, and sure enough all of my databases are back. I need to add a few users again, but when i click "privileges" in phpmyadmin it gives me the following error:

Warning: Your privilege table structure seems to be older than this MySQL version!
Please run the script mysql_fix_privilege_tables that should be included in your MySQL server distribution to solve this problem!

I opened the command line and input:

mysql.exe mysql_fix_privilege_tables

mysql pops up and says this:

ERROR 1045 (28000): Access denied for user 'ODBC'@'localhost' (using password: NO)

This is strange seeing as I didnt even set up an 'ODBC' user so I dont know why its not taking the 'root' username. Any suggestions to help fix this problem?

phranque

1:21 pm on Sep 20, 2007 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



you can specify the root user option with "-u root" in the command line.

phranque

2:02 pm on Sep 20, 2007 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



you might also need to do a "mysqladmin reload" to refresh the grant table privileges.