You may need to reset the password for root@localhost
You must do the following:
Step 1) Add this line to my.cnf
skip-grant-tables
Step 2) Restart mysql
Step 3) Run mysql (no userid or password needed)
Step 4) Run this query
SELECT user,host,password FROM mysql.user WHERE user='root' AND host='localhost'\G
If a row comes back, then set the password as follows:
UPDATE mysql.user SET PASSWORD=PASSWORD('whateverpasswordyoulike') WHERE user='root' AND host='localhost';
If a row does not come back, painful though this may be, you must does the following:
Step 4a) INSERT INTO mysql.user (user,host,pass) VALUES ('root','localhost',PASSWORD('whateverpasswordyoulike'));
Step 4b) SELECT user,host,password FROM mysql.user WHERE user='root' AND host='localhost'\G
This shows every column on a separate row. You will have to set each column as follows:
UPDATE mysql.user SET select_priv='Y' WHERE user='root' AND host='localhost';
UPDATE mysql.user SET insert_priv='Y' WHERE user='root' AND host='localhost';
UPDATE mysql.user SET delete_priv='Y' WHERE user='root' AND host='localhost';
...
Do this until all privs are manually set.
BTW The SQL GRANT command does not work with skip-grant-tables enabled !!!
Step 5) exit mysql
Step 6) Remove or Comment out 'skip-grant-tables' from my.cnf
Step 7) Restart mysql
Give it a Try !!!