SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Addict
    Join Date
    Mar 2002
    Location
    Los Angeles
    Posts
    325
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    setting up users in mysql

    I am going through a book right now on php/mysql, and i am at this part where i am supposed to add a user, so i type this:



    Code:
    mysql> grant select, insert, update, delete, index, alter, create, drop  
        -> on books.*
        -> to bookorama identified by 'books123';
    and mysql tells me everything went OK, 0 rows affected.

    If i check out the users through phpMyAdmin, it tells me the user was there and has a password, great.

    now when i try to sign into mysql using that user's name and password, it gives me an ACCESS DENIED message. But, I can sign into mysql using any user name (or absolutely anything for that matter) and no password. Whats going on?
    From here on, it's instinctual...even straight roads meander.

  2. #2
    SitePoint Wizard
    Join Date
    May 2003
    Location
    Berlin, Germany
    Posts
    1,829
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi,

    First off you can use "ALL" instead of "insert, update, ...". This is because you use all possible privileges anyway.

    Second the problem may be that you don't specify a hostname. That means you will to write "...to bookorama@localhost identified by.."

    If you still get your access denied, then the privileges for root have changed already.

    Restart the mySQL monitor and type shell>mysql -uroot -ppassroot

    If the user is not there yet, then a new account gets created or else the password changed.

    Hope this helps.

  3. #3
    SitePoint Addict
    Join Date
    Mar 2002
    Location
    Los Angeles
    Posts
    325
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    yeah, my root priveleges and password were set a long time ago.

    When i got the access denied error it said for bookorama@localhost
    From here on, it's instinctual...even straight roads meander.


Bookmarks

Posting Permissions

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