Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 19 Jul 2002 18:25:22 -0400
From:      David Banning <david@skytrackercanada.com>
To:        Nathan Kinkade <nkinkade@dsl-only.com>
Cc:        questions@freebsd.org
Subject:   Re: php-mysql question
Message-ID:  <20020719182522.A22952@skytrackercanada.com>
In-Reply-To: <20020719085141.667f52fd.nkinkade@dsl-only.com>; from nkinkade@dsl-only.com on Fri, Jul 19, 2002 at 08:51:41AM -0700
References:  <20020719030832.A88231@skytrackercanada.com> <20020719085141.667f52fd.nkinkade@dsl-only.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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 <david@skytrackercanada.com> 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 <? phpinfo() ?> 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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020719182522.A22952>