Re: Can't connect to local MySQL server
From: Inuyasha4Life (NoSpam_at_Please.com)
Date: 03/23/04
- Next message: Peter: "Re: Creating html files"
- Previous message: Inuyasha4Life: "Another Regex Problem..."
- In reply to: Rob: "Can't connect to local MySQL server"
- Next in thread: Rob: "Re: Can't connect to local MySQL server"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 23 Mar 2004 15:29:11 -0500
Rob wrote:
> Hello all,
>
> On a server (MySQL 4.0.15a, PHP 4.3.4 and Apache 20020903) the following
> error is thrown;
>
> mysql_query(): Can't connect to local MySQL server through socket
> '/tmp/mysql.sock' (2)
>
> This happens sometimes (but not all the time) to some of my users (but not
> all) and I can't reproduce this error from my location.
>
> The code which is throwing this error is code which runs on 20 other
> servers and never had any problem or throwing the same error.
>
> Can somebody explain me what can cause this error?
>
> Any help is appreciated
> Rob
I'm only 50% sure about this solution but it can't hurt, so try it anyways.
First, to test it out, log in as root (or su root) and try to connect to the
database. If it works there, it's probably that you don't have permission
to access the database with the permissions on that user. Either change the
groups given to your user account or change the gid of the mysql socket (or
the permissions to -r-xr-xr-x)
-- Inuyasha4Life
- Next message: Peter: "Re: Creating html files"
- Previous message: Inuyasha4Life: "Another Regex Problem..."
- In reply to: Rob: "Can't connect to local MySQL server"
- Next in thread: Rob: "Re: Can't connect to local MySQL server"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|