Results 1 to 6 of 6
  1. #1
    Join Date
    Aug 2003
    Location
    Seattle, WA
    Posts
    3

    Unanswered: Creating new User

    Hi,

    I've installed 4.1 on a WinXP Pro box and I can't create new users using GRANT. I've gone into mysqladmin and typed the following to set the root password:
    Code:
    c:\mysql\bin mysqladmin -u root password 'newpassword here'
    then I go into mysql monitor by typing:
    Code:
    c:\mysql\bin mysql -u root -p
    password: i put my password here
    but then I get:
    Code:
    1045 error: Access denied for user: '@localhost' (Using password: NO)
    mysql>
    I've even tried creating a user without setting the root password by typing:
    Code:
    GRANT ALL ON *.* TO michael@localhost IDENTIFIED BY 'somepassword';
    I get the same 1045 error. I thougt the default privilege level upon install was all. If this is true why couldn't I create a new user using GRANT? Any help would be greatly appreciated.

    Thanks!

  2. #2
    Join Date
    Aug 2003
    Location
    FDR India
    Posts
    24
    Hi

    Try the following -

    * Specify -h localhost as a argument to mysql client.

    * start mysqld (mysql server) with --skip-grant-tables argument and check if your GRANTs had any effect i.e. after you start the server with the above argument run select user, host, password from mysql.user. See if the users you created have anything in the password column.

    * Check the GRANT syntax on MySQL manual for more details about the error.

    regards
    theN

  3. #3
    Join Date
    Aug 2003
    Location
    Seattle, WA
    Posts
    3
    That worked. Thanks!!

  4. #4
    Join Date
    Aug 2003
    Posts
    5
    Originally posted by capnqwest
    That worked. Thanks!!
    Hi,

    can you tell me the exact command that you used to fix the problem? I tried it with no luck. Thanks.

    Frank

  5. #5
    Join Date
    Aug 2003
    Location
    Seattle, WA
    Posts
    3
    Well the easiest way to do it is this:

    c:\mysql\bin mysql -u root

    mysql>GRANT ALL ON *.* to user@localhost IDENTIFIED BY 'somepassword';

    This is assuming that it's a new install and you haven't set the password for root yet. Let me know if your still having problems.

    Good luck.

  6. #6
    Join Date
    Aug 2003
    Posts
    5
    Originally posted by capnqwest
    Well the easiest way to do it is this:

    c:\mysql\bin mysql -u root

    mysql>GRANT ALL ON *.* to user@localhost IDENTIFIED BY 'somepassword';

    This is assuming that it's a new install and you haven't set the password for root yet. Let me know if your still having problems.

    Good luck.
    Thanks. I had to reinstall mysql fresh and then just go thru the manual steps and then use the command.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •