[thelist] PHP/MySQL for beginners...

John Corry webshot at neoncowboy.com
Sat May 13 16:02:04 2000


This is the error I get:

Warning: MySQL Connection Failed: Access denied for user:
'webshot@neoncowboy.com' (Using password: NO) in
/mnt/web/guide/neoncowboy/www/data/database_test.php3 on line 22

using this script...
<?
//set up some variables here...
$dbServer =  "www.adomain.com";
$dbUserName =  "user";
$dbPWD = "";



print  "Attempting to connect to the database ...<BR>\n";
$conn = mySQL_connect (
$dbServer,
$dbUserName,
$dbPWD
);

//check the connection
if (!$conn)

    print "Connection Error.";
    exit;
} else

    print  "Connected to database "$dbUserName" ...<BR>\n";
}


if ($conn) mysql_close($conn);
?>

I'm a newbie at this...but it doesn't really seem that hard. My db admin
told me that he had set up a dataabse for me and gave me the dbname,
username, and that the password was null by default...oh yeah, also, how do
I give the database a password? And, how do I create another user (like,
webuser) so I don't have to put my db PWD in my PHP files?