View Single Post
  #1 (permalink)  
Old October 17th, 2005, 01:06 PM
kanjigirl kanjigirl is offline
Registered User
 
Join Date: Oct 2005
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default access denied for new user, Chapter 3

Hi -

Regarding Chapter 3 pg 93-96 - I created the two files createmovie.php and moviedata.php. At the top of createmovie.php I have the following:

<?php

//connect to MySQL using my username and password
$connect = mysql_connect("localhost", "bp5am", "bp5ampass") or die ("Hey loser, check your server connection.");

//create a new main database if it doesn't already exist
$create = mysql_query("CREATE DATABASE IF NOT EXISTS moviesite") or die (mysql_error());

//make sure our properly created database is the active one
mysql_select_db("moviesite"); >>>>>>

As requested on page 93, I went into MySQL and created a new user 'bp5am' on 'localhost' with password 'bp5ampass' and granted this user Select, Insert, and Update privileges.

When I run createmovie.php in my browser, I get the message 'Access denied for user 'bp5am'@'localhost' to database 'moviesite'. And nothing else.

What have I done wrong here? I tried the code I typed AND the code I downloaded with the same result. Please help.

Debbie
Reply With Quote