Re: Need some help on security with php and mysql

From: Date: Thu, 28 Mar 2002 10:34:41 +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-90502@lists.php.net to get a copy of this message
Did you flush the privileges? Using either flush privileges or mysqladmin reload? And besides, you really should be using a GRANT query to do this. -Rasmus On Thu, 28 Mar 2002, hamish 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 > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >

« previous php.general (#90502) next »