 |
BOOK: Beginning PHP 6, Apache, MySQL 6 Web Development ISBN: 9780470391143
 | This is the forum to discuss the Wrox book Beginning PHP 6, Apache, MySQL 6 Web Development by Timothy Boronczyk, Elizabeth Naramore, Jason Gerner, Yann Le Scouarnec, Jeremy Stolz; ISBN: 9780470391143 |
|
Welcome to the p2p.wrox.com Forums.
You are currently viewing the BOOK: Beginning PHP 6, Apache, MySQL 6 Web Development ISBN: 9780470391143 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
|
|
|

June 11th, 2009, 10:14 PM
|
Registered User
|
|
Join Date: Jun 2009
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Creating a Database - Chapter 3
I'm having trouble with creating the database on page 87 of chapter 3. I downloaded the code from the site, so I know it's not a code issue. Also, if I use the MySQL root username and password I have no problems. If I use the book's suggested username (bp6am) and password (bp6ampass) I get the following message:
Access denied for user 'bp6am'@'localhost' to database 'moviesite'.
Can someone tell me what I'm doing wrong?
Thanks,
James
|

March 14th, 2010, 06:29 PM
|
Registered User
|
|
Join Date: Mar 2010
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Quote:
Originally Posted by jamesmont
I'm having trouble with creating the database on page 87 of chapter 3. I downloaded the code from the site, so I know it's not a code issue. Also, if I use the MySQL root username and password I have no problems. If I use the book's suggested username (bp6am) and password (bp6ampass) I get the following message:
Access denied for user 'bp6am'@'localhost' to database 'moviesite'.
Can someone tell me what I'm doing wrong?
Thanks,
James
|
Hi James,
I am having the same problem as above. Did you work out how to fix this?
Cheers,
ribbt
|

March 14th, 2010, 06:36 PM
|
Friend of Wrox
|
|
Join Date: Dec 2008
Posts: 238
Thanks: 2
Thanked 20 Times in 19 Posts
|
|
Did you create the user and give the proper grant?
|

March 14th, 2010, 06:43 PM
|
Registered User
|
|
Join Date: Mar 2010
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Quote:
Originally Posted by PeterPeiGuo
Did you create the user and give the proper grant?
|
Hi Peter,
Entered the following in mysql>
GRANT SELECT, INSERT, UPDATE ON *.*
TO [email protected]
IDENTIFIED BY "bp6ampass";
(Query OK, 0 rows affected <0.05sec>)
Any other ideas?
Thanks,
ribbet
|

March 14th, 2010, 07:21 PM
|
Friend of Wrox
|
|
Join Date: Dec 2008
Posts: 238
Thanks: 2
Thanked 20 Times in 19 Posts
|
|
I tested with this:
Code:
grant all privileges on *.* to 'bp6am' with grant option;
Login as root and do the above. I assume you already created user bp6am first.
|

March 14th, 2010, 07:52 PM
|
Registered User
|
|
Join Date: Mar 2010
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Quote:
Originally Posted by PeterPeiGuo
I tested with this:
Code:
grant all privileges on *.* to 'bp6am' with grant option;
Login as root and do the above. I assume you already created user bp6am first.
|
tried the above and get "can't find any matching row in the user table".
does the input: GRANT SELECT,INSERT,UPDATE ON *.* TO [email protected] actually create the actual user account or is there something before this that i may have missed?
Thanks
|

March 14th, 2010, 08:00 PM
|
Friend of Wrox
|
|
Join Date: Dec 2008
Posts: 238
Thanks: 2
Thanked 20 Times in 19 Posts
|
|
No, grant does not create account. You have to first do the following:
Code:
CREATE USER 'bp6am' IDENTIFIED BY 'bp6ampass'
Then grant.
Afterwards you can use mysql client to test whether you can login as bp6am and whether bp6am can see the table.
|

March 14th, 2010, 11:15 PM
|
Registered User
|
|
Join Date: Mar 2010
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Okay, I tried the following so that i could start again:
Code:
drop user 'bp6am';
delete from mysql.user where host="localhost" and user="bp6am";
Logged in as 'root', and did the following:
Code:
CREATE USER 'bp6am' IDENTIFIED BY 'bp6ampass';
grant all privileges on *.* to 'bp6am' with grant option;
GRANT SELECT, INSERT, UPDATE ON *.*
TO [email protected]
IDENTIFIED BY "bp6ampass";
I can login successfully through a command prompt using the above and can also execute the following:
Code:
show tables from mysql;
I also copied the chapter code to rule out my input error.
However, I am still getting am still getting the error:
"Access denied for user 'bp6am'@'localhost' to database 'moviesite' "
Anything else i may have missed? Are there any other tests i could run that require administrative privileges?
|

March 15th, 2010, 02:14 AM
|
Registered User
|
|
Join Date: Mar 2010
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Scouring through mysql online documentation and it occured to me that 'grant all' is a higher level than 'grant insert, select etc..
Seeing the "Movie database successfully created!" was like a dream come true!
Cheers,
ribbet
Last edited by ribbet; March 15th, 2010 at 02:21 AM..
|

October 10th, 2010, 11:11 PM
|
Registered User
|
|
Join Date: Oct 2010
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
I have resolve the problem!
GRANT CREATE,SELECT, INSERT, UPDATE ON *.*
add "CREATE" ,it works.
|
|
 |