Miretsky,
Wednesday, May 22, 2002, 8:41:57 PM, you wrote:

M> I tried to create a password for the root user in a new installation of
M> MySQL by  typing
M> % mysql -u root mysql
M> Then typing and update statement like
M> Update user set password = "somepassword" where user="root";

You must use the PASSWORD() function: 
    UPDATE user SET password = PASSWORD("somepassword") WHERE user="root";

M> After doing this I typed because I could still get into mysql without a
M> password
M> % mysqladmin -u root status
M> % mysqladmin -u root reload

If you change data in privilege tables manually (without using GRANT)
you should do FLUSH PRIVILEGES or mysqladmin reload.

M> I think what I should have done is typed - update user SET password =
M> PASSWORD("somepassword") where user ="root".

Yes.

M> Now I can't get into mysql at all as root, with the password I set.

M> I get the error message "Access denied for user 'root@localhost' (using
M> password =YES)"

Your password is stored in user table in non-encrypted state. When you
try to connect with -p option MySQL encrypts your password with
PASSWORD() function and compares result of function with data in user
table.

M> I have tried to restart mysql with the --skip-grant-tables option but I
M> still can't get in as root?

You get access denied error again???? If so, when you get error: when
you try to connect to the MySQL server, when you try to reset
password???

M> How do I fix this? Can anyone help?

M> Anya Miretsky





-- 
For technical support contracts, goto https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.net http://www.ensita.net/
   __  ___     ___ ____  __
  /  |/  /_ __/ __/ __ \/ /    Egor Egorov
 / /|_/ / // /\ \/ /_/ / /__   [EMAIL PROTECTED]
/_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.net
       <___/   www.mysql.com



---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to