From owner-freebsd-questions Fri Jul 19 15:25:34 2002 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8AFBF37B400 for ; Fri, 19 Jul 2002 15:25:31 -0700 (PDT) Received: from skytrackercanada.com (cust29.209.188.66.dsl.accessv.com [209.188.66.29]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7CC3B43E6A for ; Fri, 19 Jul 2002 15:25:30 -0700 (PDT) (envelope-from david@skytrackercanada.com) Received: (from david@localhost) by skytrackercanada.com (8.12.3/8.12.3) id g6JMPMan022978; Fri, 19 Jul 2002 18:25:22 -0400 (EDT) (envelope-from david) Date: Fri, 19 Jul 2002 18:25:22 -0400 From: David Banning To: Nathan Kinkade Cc: questions@freebsd.org Subject: Re: php-mysql question Message-ID: <20020719182522.A22952@skytrackercanada.com> References: <20020719030832.A88231@skytrackercanada.com> <20020719085141.667f52fd.nkinkade@dsl-only.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20020719085141.667f52fd.nkinkade@dsl-only.com>; from nkinkade@dsl-only.com on Fri, Jul 19, 2002 at 08:51:41AM -0700 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Still stuck - On Fri, Jul 19, 2002 at 08:51:41AM -0700, Nathan Kinkade wrote: > On Fri, 19 Jul 2002 03:08:32 -0400 > David Banning wrote: > > > I just attempted to install php-templates. That seemed to install a > > newer version of mod-php4 from the ports. It seems that apache, ssl, > > php and mysql all work, but I cannot access mysql through php anymore. > > > > How does php know where to find the database structure of mysql? > > I have never had a php.ini, as I just went by the > > defaults. I wonder whether the defaults have changed in newer > > releases? > > PHP doesn't work directly with MySQL databases, thus it doesn't have to > know where to find them. It simply talks to the `mysqld` (MySQL Daemon) > which should be listening on a standard port. In any case, double check > that the newer version of PHP was compiled with MySQL support. Create a Yes, it was. FYI, the is available at http://skytrackercanada.com/test.php > check to make sure that `mysqld` is running. Maybe do a `sockstat | > grep mysql` - you should see an entry for mysqld listening on port 3306.sh-2.03$ ps ax | grep mysql 99329 p1 I 0:00.01 /bin/sh /usr/local/bin/safe_mysqld --user=mysql 99344 p1 S 0:00.07 /usr/local/libexec/mysqld --basedir=/usr/local --data bash-2.03$ sockstat | grep mysql mysql mysqld 99344 5 tcp4 *:3306 *:* nobody httpd 22838 5 stream mysqld[99344]:23 nobody httpd 22837 5 stream mysqld[99344]:21 nobody httpd 22836 5 stream mysqld[99344]:20 nobody httpd 22835 5 stream mysqld[99344]:22 nobody httpd 22834 5 stream mysqld[99344]:7 mysql mysqld 99344 6 stream /tmp/mysql.sock mysql mysqld 99344 7 stream /tmp/mysql.sock mysql mysqld 99344 20 stream /tmp/mysql.sock mysql mysqld 99344 21 stream /tmp/mysql.sock mysql mysqld 99344 22 stream /tmp/mysql.sock mysql mysqld 99344 23 stream /tmp/mysql.sock As I mentioned, mysql is working. I am getting this error "no database selected" when I try to connect to mysql with phpmyadmin or with my separate custom php appication. I have deleted /usr/local/etc/php.ini so it should be running on the default parameters. Presently I am running; mod_php4-4.2.1_2 mysql-client-3.23.51 p5-Mysql-modules-1.2216 (do I need this?) mysql-server-3.23.51 on FreeBSD 4.5S Anyone got any ideas? To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message