List:General Discussion« Previous MessageNext Message »
From:Neil Curri Date:July 19 2000 4:59am
Subject:Re: mysql root password problem
View as plain text  
> Check the manual (this is from that fine document)
> regarding the --skip-grant-tables option to allow
> access to the user table:

It's a fine document indeed, I just did not specify -u root when logging
into mysql. Since mysqld was started without grants, I suppose mysql
does not automatically assume I am logging in as root (logged into
system as root)... what does the "&" do?

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

Lovely. Got into it from there, however:

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

Ok, here's the prob:

mysql> grant all on *.* to root@localhost identified by "my_password"
with grant option;
ERROR 1047: Unknown command

I'm checking the syntax, and I believe this is correct:

grant all			# grants all privileges

on *.*				# on all databases

to root@localhost		# to mysql root user (there are two 
				# entries for root in the mysql database, 
				# though.... root@localhost and 
				# root@stripped)

identified by "my_password"	# it's wierd, I can query the mysql db for
				# root's password, but still won't let me in
				# using that password - I can change it too.

with grant option		# that should allow root to assign grants
				# for other mysql users

So, first I just tried using the grant statement again, creating an
additional account to be the "superuser" of mysql:

mysql> grant all on *.* to ncurri@localhost identified by "my_password"
with grant option;
ERROR 1047: Unknown command

Ok, so perhaps I just never reloaded the grants when I originally made
changes to the user table (I did this by issuing update statements on
the mysql database rather than using grant statements), so I tried:
mysql> flush grants

Then logged out and tried logging back into mysql again with:
mysql -u root -p 

and entering root's password - I know what it is, I had just been able
to query the user table for it - I'm still locked out. Furthermore, when
I try logging into mysql again without specifying -p, I again receive
the error message:

ERROR 1044: Access denied for user: '@localhost' to database 'mysql'

I suppose I might be able to log back in if I kill and restart mysqld
without grants again, but I've had to "-9" mysqld at least 5 times
today... argh. Thanks for the help, afraid I'm a bit of a problem child
today.
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