Mailinglist Archive: opensuse (5130 mails)

< Previous Next >
Re: [SLE] Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (13)
  • From: Alan Purchase <alan@xxxxxxxxxxxxxx>
  • Date: Fri, 12 May 2006 23:08:06 +1200
  • Message-id: <44646C96.4070303@xxxxxxxxxxxxxx>
George Stoianov wrote:
> --- Alan Purchase <alan@xxxxxxxxxxxxxx> wrote:
>
>
>> Hi All,
>>
>> When I try to connect to web sites residing on my
>> laptop (both
>> http://localhost/website and
>> http://localhost/~user/website) I get the
>> following message:
>> "Can't connect to local MySQL server through socket
>> '/var/lib/mysql/mysql.sock' (13)".
>>
>
> Do you have a php/perl/python etc. script that
> connects to MySQL??? What is it what is your code??
>
>
The web sites I build typically use the Drupal CMS and are written in PHP.
>> The socket in question exists in /var/lib/mysql, it
>> is owned by the
>> mysql.mysql user and has the necessary permissions
>> (775). Also, the
>> mysql folder and the database folders within it are
>> owned by mysql.mysql
>> and have the necessary permissions (775).
>>
>
> is mysql running?? Have you started it through YaST??
>
Yes it is running. Runlevels are the defaults, 2, 3 and 5.
>
>> Also, when connecting to
>> http://localhost/phpMyAdmin/ I got the
>> following error message from MySQL:
>> #2002 - The server is not responding (or the local
>> MySQL server's socket
>> is not correctly configured).
>> However, after changing the server name in
>> config.inc.php from localhost
>> to 127.0.0.1 I can connect to phpMyAdmin
>> successfully.
>>
>> Has anyone any ideas on what I am doing wrong? I
>> have googled myself
>> silly to no avail and would appreciate some
>> assistance.
>>
>
> check your host name is it local host when you run the
> script in run levels did you get a warning that you
> will not be able to use localhost?? What versions are
> you using??
>
No warnings.

Apache 2.0.54, MySQL 4.1.13, PHP 4.4.0.

I don't see why this is proving so difficult. It worked 'out of the box'
on Mandrake 9, a wee while ago mind you.
> Regards,
> George
>
>
>
>
>> Cheers, Alan.
>>
>> Alan Purchase
>> Tregenna Business Services
>> 113 Victory Road
>> Laingholm
>> Auckland 1007
>> New Zealand
>> ||
>>
>> --
>> Check the headers for your unsubscription address
>> For additional commands send e-mail to
>> suse-linux-e-help@xxxxxxxx
>> Also check the archives at http://lists.suse.com
>> Please read the FAQs: suse-linux-e-faq@xxxxxxxx
>>
>>
>>
>>
>
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
>
>



< Previous Next >
References