List:General Discussion« Previous MessageNext Message »
From:curt Date:July 19 2000 4:29am
Subject:Re: mysql root password problem
View as plain text  
Reinstall?  We don' need no stinking reinstall. 

I don't think we do, anyway...



Check the manual (this is from that fine document) 
regarding the --skip-grant-tables option to allow 
access to the user table:

Starting from your mysql install directory...


shell> ./bin/safe_mysqld --skip-grant-tables &
shell> ./bin/mysql -u root mysql

mysql> SELECT * FROM user;

#
#  make adjustments to the user table using GRANT to add 'em
#

mysql> FLUSH PRIVILEGES;

mysql> exit

shell> ./bin/mysqladmin -u root shutdown

#
#  now restart the server normally to test 
#

shell> ./bin/safe_mysqld --log &
shell> ./bin/mysql -u new-user -p mysql
shell> password: new-password

mysql> 

You're there!

hope this helps.

curt

----------------------------------------

Neil Curri wrote:
> 
> Robert Goff wrote:
> > ....But my speculation is that you might need to manually
> > remove all records for the root user from the user table, then re-issue the
> > grant command.  You're using the grant command, not inserting into the user
> > table, right?  The grant command is less susceptible to typos causing you to
> > be locked out of the root account.
> 
> Nope, I hadn't been using GRANT, I was modifying the mysql user table
> directly, as root. I can't seem to get into the mysql database at all
> now. I can start mysqld (as *system* root) with the -Sg option and log
> into mysql, but now I can no longer modify the mysql database or issue
> GRANT statements:
> 
> ERROR 1044: Access denied for user: '@localhost' to database 'mysql'
> 
> Yikes, is it time to think about reinstalling?
> 
> --
> ---------------------------------------------------------------------
> Please check "http://www.mysql.com/php/manual.php" before
> posting. To request this thread, e-mail mysql-thread44509@stripped
> 
> To unsubscribe, send a message to:
>     <mysql-unsubscribe-curtpdx=inetarena.com@stripped>
> 
> If you have a broken mail client that cannot send a message to the above
> address(Microsoft Outlook), you can use http://lists.mysql.com/php/unsubscribe.php
Thread
mysql root password problemNeil Curri17 Jul
  • RE: mysql root password problemRobert Goff17 Jul
    • Re: mysql root password problemNeil Curri17 Jul
Re: mysql root password problemNeil Curri19 Jul
Re: mysql root password problemcurt19 Jul
Re: mysql root password problemNeil Curri19 Jul
  • RE: mysql root password problemRobert Goff19 Jul
    • Re: mysql root password problemNeil Curri19 Jul
      • RE: mysql root password problemRobert Goff19 Jul
Re: mysql root password problemcurt19 Jul
  • RE: mysql root password problemRobert Goff19 Jul
Re: mysql root password problemColin Faber19 Jul