Been there, done that - over and over. It is one of the FAQs:

http://dev.mysql.com/doc/refman/5.1/en/resetting-permissions.html

>-----Original Message-----
>From: Noah Garrett Wallach [mailto:no...@yahoo-inc.com]
>Sent: Thursday, August 13, 2009 2:49 AM
>To: mysql@lists.mysql.com
>Subject: setting up root account
>
>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=jschwa...@the-
>infoshop.com





-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/mysql?unsub=arch...@jab.org

Reply via email to