Newbie seeks help with PHP database connection problems
| From: | r.gelstharp | Date: | Wed, 18 Apr 2001 18:40:34 +0000 |
| Subject: | Newbie seeks help with PHP database connection problems | ||
| References: | 1 2 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-6833@lists.php.net to get a copy of this message | ||
I have installed PHP4 on my Windows 98 machine and have downloaded the
latest MySQL server too.
I can finally get my PHP scripts to run, but I'm now having problems when
trying to connect to my database.
I have followed the steps in the book by Julie Meloni PHP Essentials, and
have, as far as I can tell, created a blank database in MySQL. I tried
running some simple code from this book to create tables in this database,
but it won't connect. When I added the code "or die(mysql_error())" to the
line that tries to connect to the databse it throws up an error that says
that I don't have access privileges to it or something like that.
How do you create user access priviliges in MySQL and where would you put a
username and password in the mysql_select_db() statement?
Thanks.