Re: Connecting to MySQL

From: Date: Thu, 21 Jun 2001 21:40:16 +0000
Subject: Re: Connecting to MySQL
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-9706@lists.php.net to get a copy of this message
Keith Whyman pressed the little lettered thingies in this order... > Can anyone help with this problem ! > user name should just be keith but the @localhost gets added and then I > can't connect ??? > > Warning: MySQL Connection Failed: Access denied for user: 'keith@localhost' > (Using password: YES) in /usr/var/www/www.happy.de/html/cms/test.php on > line 23 Problem connecting to DataBase > A copy of the code you are trying to use to connect top the DB would be helpful. Basically, "@localhost" gets added to your username whenever you haven't specified a host name. Did you use mysql_connect() or mysql_pconnect() before attempting to run the query? mysql_connect("host_name","user","password"); $result = mysql("db_name","query"); Christopher Ostmo a.k.a. tech@AppIdeas.com AppIdeas.com Meeting cutting edge dynamic web site needs For a good time, http://www.AppIdeas.com/

« previous php.db (#9706) next »