Re: Can't connect to local MySQL server

From: Inuyasha4Life (NoSpam_at_Please.com)
Date: 03/23/04


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



Relevant Pages

  • Re: Change User ID - Possible?
    ... Never directly change SharePoint data in the database. ... The Only way you can do is to replace the user account i.e. delete the old user account and add a new user account, but before you delete the old account you have to find out the permissions of the old account and apply the same permissions to the new account, this can be automated through code. ...
    (microsoft.public.sharepoint.windowsservices)
  • Re: Error 21002: [ SQL-DMO] User "xxxxx" already exists.
    ... What version and service pack of SQL Server are you running? ... No restoration of database was performed. ... I do not see that user account as orphaned. ... > saved with necessary permissions for the selected database. ...
    (microsoft.public.sqlserver.security)
  • Re: OLEDB database connection from ASP.NET
    ... ASP.NET applications run under the user account ASPNET by default. ... permissions to your database. ... > the database in ASP. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Problem while opeing the Access DB
    ... You are getting that message because the database was secured in 97. ... You can provide the 97 workgroup file, and they can use it in 2000, however ... permissions or be the owner of the mdb. ... > The current user account doesn't have permission to convert or enable ...
    (microsoft.public.access.security)
  • Re: IEXPLORE.EXE is not a valid Win32 application
    ... Reinstalling the database didn´t help. ... > Hi Rob. ... > STE, Windows Embedded Group ...
    (microsoft.public.windowsxp.embedded)