Bennett Haselton <[EMAIL PROTECTED]> wrote: > While logged in to my Linux server as root, I went in to MySQL and (with no > databases selected, so that the "GRANT" statement would apply globally), > ran the command: > > mysql> grant all privileges on * to bhaselto identified by '<password>'; > > where <password> is, of course, the password I wanted to use for the user > 'bhaselto'. I can see an entry for that user in the 'user' table in the > 'mysql' database: > > +------------------------+----------+------------------+-------------+-------------+-------------+-------------+-------------+-----------+-------------+---------------+--------------+-----------+------------+-----------------+------------+------------+ > | Host | User | Password | Select_priv | > Insert_priv | Update_priv | Delete_priv | Create_priv | Drop_priv | > Reload_priv | Shutdown_priv | Process_priv | File_priv | Grant_priv | > References_priv | Index_priv | Alter_priv | > +------------------------+----------+------------------+-------------+-------------+-------------+-------------+-------------+-----------+-------------+---------------+--------------+-----------+------------+-----------------+------------+------------+ > > [...] > > | % | bhaselto | <alphanumerics> | Y | > Y | Y | Y | Y | Y | > N | N | N | N | N | > Y | Y | Y | > > where <alphanumerics> is an alphanumeric code that presumably represents > the hash of the password that I entered. > > However, if I exit mysql and try logging in with the "bhaselto" username, > it doesn't let me: > > [EMAIL PROTECTED] bhaselto]$ mysql -u bhaselto -p > Enter password: [Here I type the password that I created above] > ERROR 1045: Access denied for user: '[EMAIL PROTECTED]' (Using password: > YES) > [EMAIL PROTECTED] bhaselto]$ > > As far as I can tell from reading > http://www.mysql.com/doc/en/GRANT.html > I followed the GRANT syntax > correctly for creating a new user; why can't I connect to MySQL as that > user?
Remove from table user entry for ''@'localhost' and then execute FLUSH PRIVILEGES. -- For technical support contracts, goto https://order.mysql.com/?ref=ensita This email is sponsored by Ensita.net http://www.ensita.net/ __ ___ ___ ____ __ / |/ /_ __/ __/ __ \/ / Victoria Reznichenko / /|_/ / // /\ \/ /_/ / /__ [EMAIL PROTECTED] /_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.net <___/ www.mysql.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]