Re: Can't connect php to mysql on linux

From: Date: Mon, 26 Feb 2001 00:39:01 +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-41624@lists.php.net to get a copy of this message
George, 1. Is this a brand new project, or were you connecting before, on your web pages? If the latter, what changed? 2. **IMPORTANT** Have you also run phpinfo() and confirmed that you have mysql support installed? **IMPORTANT** 3. Did you stop and restart Apache? 4. Have you tried a minimal page - just connecting and echoing the result? or with a built-in die message? 5. Is this a self-hosted server, or someone elses? What name combinations of localhost, username and password have you played with? What name is mysql running under? I'll also confess I've given up on .rpms for all of mysql, apache and php. It's fairly quick to build them from source, and you have full control over where things are placed. Search for something like "LAMP Apache" and that will turn up the necessary tutorials. This probably hasn't been much direct help, but maybe it'll get you going. It's not fun, but I've slowly learned to check basics first! (Like the wire, when there's a network connectivity problem - sheepish grin.) Regards - Miles Thompson At 10:11 AM 2/26/01 +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 --
David Robley                        | WEBMASTER & Mail List Admin
RESEARCH CENTRE FOR INJURY STUDIES | http://www.nisu.flinders.edu.au/
AusEinet                            | http://auseinet.flinders.edu.au/
            Flinders University, ADELAIDE, SOUTH AUSTRALIA
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net For additional commands, e-mail: php-general-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net


« previous php.general (#41624) next »