List:General Discussion« Previous MessageNext Message »
From:Paul DuBois Date:February 17 2000 4:06am
Subject:Re: user creation
View as plain text  
>I am creating a user, but I can't log in as that user from localhost
>('mysql -u me -p' fails)
>here is the insert query:
>mysql> insert into user
>     -> (host, user, password, select_priv, insert_priv, update_priv,
>delete_priv, create_priv, drop_priv, alter_priv)
>     -> values('%','me',password('XXX'),'Y','Y','Y','Y','Y','Y','Y');
>Query OK, 1 row affected (0.01 sec)
>I think the problem is with the host field, but I'm not 100% sure. when I
>try to log in it gives me:
>$ mysql -u me -p
>Enter password:
>ERROR 1045: Access denied for user: 'me@localhost' (Using password: YES)
>I've also tried specifying the exact hostname in place of the '%', but
>that didn't work..
>I'm taking the creation string RIGHT out of my ORA mysql book..
>do i need to add something more somewhere else?
>also, does it matter whether I use ' or " ?

If you have an entry with localhost as the host and a blank user value,
delete it from the user table (and db table if there's one there),
flush the privileges, and try it again.

Paul DuBois, paul@stripped
user creationM. Erickson17 Feb
  • Win2k and MysqlMark Darwin17 Feb
  • Re: user creationPaul DuBois17 Feb
    • AW: user creationLars Freymark17 Feb
  • Re: Win2k and MysqlFaisal Nasim17 Feb
  • Re: user creationsinisa17 Feb
    • MySQL Distributed DB Clusters?...Would this methodology work?Eric Peters17 Feb
    • Re: user creationM. Erickson18 Feb
      • Re: user creationsinisa18 Feb
Re: MySQL Distributed DB Clusters?...Would this methodology work?Ed Carp17 Feb