Hello all,
I am using php and mysql with phpmyadmin. I am trying to set up a username
and password in mysql so that when I use
if(!$db_conn = mysql_connect('localhost', 'username', "password")) {
echo 'Could not connect to the Database Server';
}
with the correct username and password it will connect me. I used phpmyadmin
to add the user to the users table in the mysql database. I used the
following sql statement:
INSERT INTO user (Host,User,Password)
VALUES('localhost','jeffrey',PASSWORD('biscuit'));
and the record was created in the table.
When I try to connect to the db via the php
if(!$db_conn = mysql_connect('localhost', 'jeffrey', "biscuit")) {
echo 'Could not connect to the Database Server';
}
it tells me:
Warning: Access denied for user: 'jeffrey@localhost' (Using password: YES)
in /home/httpd/htdocs/helpdesk/test.php
What have I done wrong?
cheers
Hamish
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php