MySQL Forums
Forum List  »  Newbie

Re: No Root User
Posted by: Rogelio Perez
Date: September 08, 2009 01:38PM

I have the same problem and the proposed solution doesnt work, simply because the root user does not exist on the mysql.user table.
I have verified this by doing:

/etc/init.d/mysql stop
mysqld --skip-grant-tables &
mysql -u root mysql
mysql> select user,host from user where user='root' \G

...and there's no output.

The only way I found to make it work is inserting the root user into the table by doing:

mysql> INSERT INTO user VALUES ('localhost','root',password('newpassword'),'Y','Y ','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y', 'Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','' ,'','','',0,0,0,0);
mysql> INSERT INTO user VALUES ('127.0.0.1','root',password('newpassword'),'Y','Y ','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y', 'Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','' ,'','','',0,0,0,0);

...however I dont like this method and I would like to find a different solution.

I am using Ubuntu Jaunty and I install mysql by doing: apt-get install mysql-server

Any ideas?

Options: ReplyQuote


Subject
Written By
Posted
August 24, 2009 11:34AM
August 24, 2009 10:22PM
Re: No Root User
September 08, 2009 01:38PM
September 08, 2009 09:43PM
September 14, 2009 11:40PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.