Thanks Paul.

Fully understand!!



cheers,

feng


----- Original Message -----
From: "Paul DuBois" <[EMAIL PROTECTED]>
To: "Wang Feng" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Monday, October 06, 2003 4:38 AM
Subject: Re: mysql account


> At 14:00 +1000 10/5/03, Wang Feng wrote:
> >  > If you deleted the rows with a DELETE statement, you'll need to also
> >>  issue a FLUSH PRIVILEGES statement to cause the server to reread the
> >>  grant tables.
> >
> >In order to try the FLUSH PRIVILEGES statement, I inserted a new user
> >account into the 'user' table of the 'mysql' database:
> >
> >mysql> insert into user (host, user, password) values ('localhost',
'brian',
> >'brian');
>
> That won't work to set up the account properly.  If you use INSERT to
> create an account, you must also use PASSWORD() to encrypt the account.
>
> If you use GRANT to set up the account, you specify the password in
> the IDENTIFIED BY clause, and you don't have to use PASSWORD().  GRANT
> encrypts it for you.
>
> >
> >
> >After doing this, I subsequently use FLUSH PRIVILEGES to let the MySQL
> >server reread the grant tables.
> >
> >mysql> flush privileges
> >Query OK, 0 rows affected (0.01 sec)
> >
> >
> >Then, I quit the MySQL and try to login by 'c:\mysql\bin\mysql -h
> >localhost -u brian -p' followed by the password brian. I got the
following
> >error message:
> >
> >Error: 1045: Access denied for user: '[EMAIL PROTECTED]' (Using password:
> >YES).
> >
> >
> >Then, I restart the computer, and repeat the process above again, same
> >error.  ---- It seems I don't have to restart the computer (in WindowsXP)
to
> >make the change valid.
> >
> >
> >
> >Something cause my attention is that if I do the
> >
> >mysql> select host, user, password from user;
> >
> >I found that the password of *alan* is something like 51df199bcd85 while
> >*brian's* new account password is brian. ---- That is, the later one has
not
> >been encrypted.
>
> See above.  Also, read this section of the MySQL Reference Manual:
>
> http://www.mysql.com/doc/en/Adding_users.html
>
> >
> >I can see the Alan's *actual* password characters('alan') in
WinMySQLadmin
> >or the my.conf file, not the user table; but I DO see Brian's *actual*
> >password ('brian') from the user table.
> >
> >BTW, I can't find any thing in the my.conf or WinMySQLadmin related to
the
> >*brian* --- e.g. in the my.conf file, I only can see 'user=alan,
> >password=alan'.
>
> I'm not sure why you would expect to.
>
>
> --
> Paul DuBois, Senior Technical Writer
> Madison, Wisconsin, USA
> MySQL AB, www.mysql.com
>
> Are you MySQL certified?  http://www.mysql.com/certification/


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to