If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > Grant database access?

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 07-06-04, 09:25
griffen griffen is offline
Registered User
 
Join Date: Feb 2003
Posts: 12
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,
Reply With Quote
  #2 (permalink)  
Old 07-08-04, 08:00
guelphdad guelphdad is offline
Registered User
 
Join Date: Mar 2004
Posts: 440
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.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On