[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Sheflug] PHP & mySQL
At 10:35 10/09/01 +0100, Andy Smith wrote:
>On Mon, Sep 10, 2001 at 08:57:35AM +0100, Steve Tickle wrote:
> > At 14:27 07/09/01 +0100, Andy Smith wrote:
> > >On Fri, Sep 07, 2001 at 01:50:39PM +0100, Steve Tickle wrote:
> > > > Not strictly a Linux problem but I'm having trouble connecting to
> my mySQL
> > > > server, both through PHP and using the mySQLGUI.
> > >
> > >What happens if you try and access it as the (mysql) root user from
> > >the command line using
> > >
> > >mysql -u root -p
> >
> > I can connect no problem
>
>So what are the errors when you try with PHP? How is PHP
>connecting?
Right, I've done some messing around and I think it's because the various
applications can't find mysql.sock.
I've now installed kmysql and I can connect with that OK. However, if I try
to connect through PHP I get an error saying
"MySQL Connection Failed: Can't connect to local MySQL server through
socket '/tmp/mysql.sock' (111)".
The mysql.sock file is actually situated in /var/lib/mysql.
It seems to me that I have to tell PHP to look there. The question is how.
Cheers
Steve
___________________________________________________________________
Sheffield Linux User's Group - http://www.sheflug.co.uk .
To unsubscribe from this list send mail to
shef-lug-request@list.sheflug.org.uk with the word
"unsubscribe" in the body of the message.
GNU the choice of a complete generation.