Re: Need some help on security with php and mysql

From: Date: Thu, 28 Mar 2002 12:48:12 +0000
Subject: Re: Need some help on security with php and mysql
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-90505@lists.php.net to get a copy of this message
Did you restart mysql ? could you see your entrances when using mysql on console with master/masterpassword? Oliver At 28.03.2002 10:37, you wrote:
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


« previous php.general (#90505) next »