Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2003
    Posts
    12

    Unanswered: Grant database access?

    I'm working my way through a MYSQL and PHP cookbook where they have an example involving a books database.

    I entered the following:

    grant select, insert, update, delete, index, alter, create, drop
    on books.*
    to bookorama identified by 'bookorama123';

    I then tried:

    mysql -D books -h localhost-u bookorama -p

    I always get an access denied message and I'm unsure what I'm doing wrong.
    The error message reads:

    ERROR 1045: Access denied for user: 'bookorama@localhost' (Using password: YES)

    Does anyone have any ideas?

    Thanks,

  2. #2
    Join Date
    Mar 2004
    Posts
    480
    try this instead:

    Code:
    grant select, insert, update, delete, index, alter, create, drop
    on books.*
    to bookorama identified by bookorama123;
    without the quote marks you used before. those were getting added as part of the password. When you get a password=YES error it means your password doesn't match the one in the database.

Posting Permissions

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