Maybe this thread [0] is useful for you. http://forums.mysql.com/read.php?10,70927,71012#msg-71012
On Thu, Aug 13, 2009 at 1:48 PM, Noah Garrett Wallach <no...@yahoo-inc.com>wrote: > Okay it appears my mysql database is simply screwed up. > > I am attempting to rebuild the root account and privileges and now I > cant do anything. How do I rebuild the root account with proper > privileges and the grant option. > > > I am thinking: > > mysql -u root > use mysql; > GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' WITH GRANT OPTION; > FLUSH PRIVILEGES; > GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' WITH GRANT OPTION; > FLUSH PRIVILEGES; > GRANT ALL PRIVILEGES ON *.* TO 'root'@'mypc' WITH GRANT OPTION; > FLUSH PRIVILEGES; > quit; > > > But here is what happens: > neckbridge 23:35:08 ~ $ mysql -u root > Welcome to the MySQL monitor. Commands end with ; or \g. > Your MySQL connection id is 6 > Server version: 5.1.30-Yahoo-SMP-log (RHEL 32-bit) > > Type 'help;' or '\h' for help. Type '\c' to clear the buffer. > > mysql> use mysql; > ERROR 1044 (42000): Access denied for user ''@'localhost' to database > 'mysql' > mysql> > > > > -- > MySQL General Mailing List > For list archives: http://lists.mysql.com/mysql > To unsubscribe: http://lists.mysql.com/mysql?unsub=msub...@gmail.com > > -- Muhammad Subair