Re: Can't connect php to mysql on linux

From: Date: Sun, 25 Feb 2001 23:49:37 +0000
Subject: Re: Can't connect php to mysql on linux
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-41619@lists.php.net to get a copy of this message
On Mon, Feb 26, 2001 at 10:11:02AM +1030, David Robley wrote: > On Sat, 24 Feb 2001 16:10, George Alexander wrote: > > Hi, > > > > I working on Redhat Linux 6.1 and I've installed > > MySQL-3.23.33-1.i386.rpm and MySQL-client-3.23.33-1.i386.rpm. MySql is > > working fine. I've even created a database also using MySqlAdmin. > > Regarding Php I've installed php-3.0.18-1.6.x.i386.rpm and as for > > Apache : apache-1.3.14-2.6.2.i386.rpm. I've even installed > > php-mysql-3.0.16-1.i386.rpm and mod-php3-3.0.12-2.i386.rpm. > > > > My problem is I can't connect PHP to Mysql Db using the > > mysyql_connect("localhost","root","mypassword") command. > > > > Please help me asap. > > Regards, > > George > > Use mysql_error() after your unsuccessful call to mysql_connect to return > a mysql error string Hehe, this wouldn't work if the connect was unsuccessful. You can always get an mysql error string after a successful call to mysql_connect. Look into Paul DuBois book and it should be very clear. -Egon -- http://www.linuxtag.de/ http://php.net/books.php http://www.concert-band.de/ http://www.php-buch.de/

« previous php.general (#41619) next »