#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2004
    Posts
    4
    Rep Power
    0

    error on connecting with a new user


    First off all, hello from a new user!

    Well, I´m trying to login in my db but when I try to conect with one user created by:
    GRANT SELECT ON mdb1.* TO USER@"%" IDENTIFIED BY 'U'
    the conection don´t work out. ERROR 1045. Doe´s somebody knows why?

    Thank´s for your attention,
    Rafael.

    PS: sorry for my bad english.
  2. #2
  3. Hockey face
    Devshed Supreme Being (6500+ posts)

    Join Date
    Nov 2001
    Location
    St. Catharines, Canada
    Posts
    8,142
    Rep Power
    1320
    Did you use
    FLUSH PRIVILEGES
    after creating the new user?
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2004
    Posts
    4
    Rep Power
    0
    Originally Posted by Guelphdad
    Did you use
    FLUSH PRIVILEGES
    after creating the new user?
    Yes, i did. Take a look on my prompt:

    mysql> GRANT SELECT, INSERT, DELETE, UPDATE ON mdb1.* TO KHD001@"%" IDENTIFIED BY 'KHD001';
    Query OK, 0 rows affected (0.06 sec)

    mysql> FLUSH PRIVILEGES;
    Query OK, 0 rows affected (0.03 sec)

    mysql> exit
    Bye

    C:\mysql\bin>mysql -u KHD001 -p
    Enter password: ******
    ERROR 1045 (28000): Access denied for user: 'KHD001'@'localhost' (Using password: YES)

    Is there some mistake on my procedure?

    Thank´s
  6. #4
  7. Hockey face
    Devshed Supreme Being (6500+ posts)

    Join Date
    Nov 2001
    Location
    St. Catharines, Canada
    Posts
    8,142
    Rep Power
    1320
    It means you are entering an incorrect password. Try entering the password you have given and include the single quote marks. IIRC you are not supposed to include the single quotes as you have done and they are probably being translated as part of the password.
  8. #5
  9. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2004
    Posts
    4
    Rep Power
    0
    Originally Posted by Guelphdad
    It means you are entering an incorrect password. Try entering the password you have given and include the single quote marks. IIRC you are not supposed to include the single quotes as you have done and they are probably being translated as part of the password.
    Second 4.4.2 MySQL User Names and Passwords it´s needed to use single quote marks.
    Any way, I tried your sugestion and it didn't worked.
  10. #6
  11. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2004
    Posts
    4
    Rep Power
    0

    erro conecting... solution


    Well, i've installed the msql control center and finally solved my problem..... I realised that all user's created with "%". So all user'ss host's are localhost. This is a temporary solution.
    Does somebody know´s what´s wrong on
    Grant .... to user@"%" ?
    Thank's again,
    Rafael.
  12. #7
  13. (retired)
    Devshed Supreme Being (6500+ posts)

    Join Date
    Dec 2003
    Location
    The Laboratory
    Posts
    10,054
    Rep Power
    1390
    Try it without the identified by clause:

    GRANT SELECT , INSERT , UPDATE ON database_name.* TO "username"@"localhost";

    Note - that % is just a shortcut for 'everywhere' (so user@% could be connecting from anywhere).

IMN logo majestic logo threadwatch logo seochat tools logo