PHP w/ MySQL
| From: | Nick Gianakas | Date: | Thu, 30 Jan 2003 14:49:23 +0000 |
| Subject: | PHP w/ MySQL | ||
| References: | 1 | Groups: | php.install |
| Request: | Send a blank email to php-install+get-9893@lists.php.net to get a copy of this message | ||
Hi All,
I've been struggling w/ this problem for several months now on and off.
I've exhausted my capabilities and would appreciate any help.
The problem I'm having is using PHP to access a MySQL database through
the web page.
Version Info:
PHP 4.3
Apache 1.3.24
MySQL 3.23.49a-1.
Red Hat 7.2 (default 2.4.7-10 kernel)
Although RedHat installed Apache, PHP, and MySQL, I removed them and
installed newer versions.
I configured Apache to use PHP, and it seems to work (I created a few
simple scripts and viewed them across the internet).
I also setup MySQL w/ a user who has access from the local loopback as
well as external addresses. I tested the new user on the local machine
with:
> mysql -h localhost -u dbuser01 -p testpwd
Everything works fine. The user can access the database, and perform
operations.
So far, so good.
Now I setup a PHP script to access the database. The pertinent lines
are:
phpinfo();
$link = mysql_connect("localhost", "dbuser01", "testpwd")
or die ("Could not connect to database");
But I get an error:
Warning: Access denied for user: 'dbuser01@nimble' (Using password:
YES) in /home/.../index.php on line 7
Warning: MySQL Connection Failed: Access denied for user:
'dbuser01@nimble' (Using password: YES) in /home/.../index.php on line 7
Could not connect to database
If the output of phpinfo() will help, you can find it at:
http://www.wheeloyum.com/index2.php
I appreciate any and all help.
Regards,
Nick