Can"t connect to local MySQL server through socket "/var/lib/mysql/mysql.sock" (13)

Can"t connect to local MySQL server through socket "/var/lib/mysql/mysql.sock" (13)

am 03.05.2006 21:29:06 von Arthur H Wakida

------=_NextPart_000_008D_01C66EAD.2BCBC550
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

OS RH Enterprise V4 (kernel 2.5.9-5.EL), Perl 5.8.5, DBI-1.46, =
DBD-MySQL-2.9004-3.1, MySQL 4.1.7 installed=20

I can access/update MySQL db via webmin (port 10000) and SQLyog (port =
3306) without any problem.

When I try to connect to MySQL db via ;=20
my $hndl =3D DBI->connect("DBI:mysql:$database", $user, $password) =
or db_err("Unable to contect to $database", $DBI::errstr);

I get the following message : "Can't connect to local MySQL server =
through socket '/var/lib/mysql/mysql.sock' (13)"

Socket in question does exist in /var/lib/mysql and all directories =
involved is completely open (777). I've other servers up=20
and running without any problem (albeit different versions). Did I miss =
something? Any help/ideas is greatly appreciated!=20

Arthur

------=_NextPart_000_008D_01C66EAD.2BCBC550--

Re: Can"t connect to local MySQL server through socket "/var/lib/mysql/mysql.sock" (13)

am 03.05.2006 21:44:49 von mickalo

Arthur,

the Error 13 means Permission Denied. check the ownership of the sock file, is
should be owned by the "mysql" user if owned by 'root', then this maybe causing
your problems.

Mike
----- Original Message -----
From: "Arthur H Wakida"
To:
Sent: Wednesday, May 03, 2006 2:29 PM
Subject: Can't connect to local MySQL server through socket
'/var/lib/mysql/mysql.sock' (13)


OS RH Enterprise V4 (kernel 2.5.9-5.EL), Perl 5.8.5, DBI-1.46,
DBD-MySQL-2.9004-3.1, MySQL 4.1.7 installed

I can access/update MySQL db via webmin (port 10000) and SQLyog (port 3306)
without any problem.

When I try to connect to MySQL db via ;
my $hndl = DBI->connect("DBI:mysql:$database", $user, $password) or
db_err("Unable to contect to $database", $DBI::errstr);

I get the following message : "Can't connect to local MySQL server through
socket '/var/lib/mysql/mysql.sock' (13)"

Socket in question does exist in /var/lib/mysql and all directories involved is
completely open (777). I've other servers up
and running without any problem (albeit different versions). Did I miss
something? Any help/ideas is greatly appreciated!


--
MySQL Perl Mailing List
For list archives: http://lists.mysql.com/perl
To unsubscribe: http://lists.mysql.com/perl?unsub=gcdmp-msql-mysql-modules@m .gmane.org

Re: Can"t connect to local MySQL server through socket "/var/lib/mysql/mysql.sock" (13)

am 03.05.2006 22:51:22 von Arthur H Wakida

Mike,

Thank you very much for your quick response.
Unfortunately, mysql.sock is owned by mysql and on top of that I have
it opened for all (rwx). One more info, in messages log I see following
error : ... denied {connectto } for pid=7678 exe=/usr/bin/perl
path=/var/lib/mysql/mysql.sock
scontext=root:system_r:httpd_sys_script_t
tcontext=root:system_r:unconfied_t tclass=
unix_stream_socket
My data directory and /var/lib/mysql/mysql.sock is both owned by mysql.
Firewall is completely
disabled (lokkit). I don't know what else maybe blocking this connection.

Arthur

> Arthur,
>
> the Error 13 means Permission Denied. check the ownership of the sock
> file, is should be owned by the "mysql" user if owned by 'root', then this
> maybe causing your problems.
>
> Mike
> ----- Original Message -----
> From: "Arthur H Wakida"
> To:
> Sent: Wednesday, May 03, 2006 2:29 PM
> Subject: Can't connect to local MySQL server through socket
> '/var/lib/mysql/mysql.sock' (13)
>
>
> OS RH Enterprise V4 (kernel 2.5.9-5.EL), Perl 5.8.5, DBI-1.46,
> DBD-MySQL-2.9004-3.1, MySQL 4.1.7 installed
>
> I can access/update MySQL db via webmin (port 10000) and SQLyog (port
> 3306) without any problem.
>
> When I try to connect to MySQL db via ;
> my $hndl = DBI->connect("DBI:mysql:$database", $user, $password) or
> db_err("Unable to contect to $database", $DBI::errstr);
>
> I get the following message : "Can't connect to local MySQL server through
> socket '/var/lib/mysql/mysql.sock' (13)"
>
> Socket in question does exist in /var/lib/mysql and all directories
> involved is completely open (777). I've other servers up
> and running without any problem (albeit different versions). Did I miss
> something? Any help/ideas is greatly appreciated!
>
>
> --
> MySQL Perl Mailing List
> For list archives: http://lists.mysql.com/perl
> To unsubscribe: http://lists.mysql.com/perl?unsub=ahwakida@yamada.com


--
MySQL Perl Mailing List
For list archives: http://lists.mysql.com/perl
To unsubscribe: http://lists.mysql.com/perl?unsub=gcdmp-msql-mysql-modules@m .gmane.org

Re: Can"t connect to local MySQL server through socket "/var/lib/mysql/mysql.sock" (13)

am 03.05.2006 23:06:47 von mickalo

Arthur,
----- Original Message -----
From: "Arthur H Wakida"
To: "Mike Blezien" ;
Sent: Wednesday, May 03, 2006 3:51 PM
Subject: Re: Can't connect to local MySQL server through socket
'/var/lib/mysql/mysql.sock' (13)


> Mike,
>
> Thank you very much for your quick response.
> Unfortunately, mysql.sock is owned by mysql and on top of that I have
> it opened for all (rwx). One more info, in messages log I see following
> error : ... denied {connectto } for pid=7678 exe=/usr/bin/perl
> path=/var/lib/mysql/mysql.sock
> scontext=root:system_r:httpd_sys_script_t
> tcontext=root:system_r:unconfied_t tclass=
> unix_stream_socket
> My data directory and /var/lib/mysql/mysql.sock is both owned by mysql.
> Firewall is completely
> disabled (lokkit). I don't know what else maybe blocking this connection.
>
> Arthur

is the entire mysql folder and database folders owned by 'mysql.mysql' ??

Mike


>> Arthur,
>>
>> the Error 13 means Permission Denied. check the ownership of the sock file,
>> is should be owned by the "mysql" user if owned by 'root', then this maybe
>> causing your problems.
>>
>> Mike
>> ----- Original Message -----
>> From: "Arthur H Wakida"
>> To:
>> Sent: Wednesday, May 03, 2006 2:29 PM
>> Subject: Can't connect to local MySQL server through socket
>> '/var/lib/mysql/mysql.sock' (13)
>>
>>
>> OS RH Enterprise V4 (kernel 2.5.9-5.EL), Perl 5.8.5, DBI-1.46,
>> DBD-MySQL-2.9004-3.1, MySQL 4.1.7 installed
>>
>> I can access/update MySQL db via webmin (port 10000) and SQLyog (port 3306)
>> without any problem.
>>
>> When I try to connect to MySQL db via ;
>> my $hndl = DBI->connect("DBI:mysql:$database", $user, $password) or
>> db_err("Unable to contect to $database", $DBI::errstr);
>>
>> I get the following message : "Can't connect to local MySQL server through
>> socket '/var/lib/mysql/mysql.sock' (13)"
>>
>> Socket in question does exist in /var/lib/mysql and all directories involved
>> is completely open (777). I've other servers up
>> and running without any problem (albeit different versions). Did I miss
>> something? Any help/ideas is greatly appreciated!
>>
>>
>> --
>> MySQL Perl Mailing List
>> For list archives: http://lists.mysql.com/perl
>> To unsubscribe: http://lists.mysql.com/perl?unsub=ahwakida@yamada.com
>
>
> --
> MySQL Perl Mailing List
> For list archives: http://lists.mysql.com/perl
> To unsubscribe: http://lists.mysql.com/perl?unsub=mickalo@frontiernet.net
>
>


--
MySQL Perl Mailing List
For list archives: http://lists.mysql.com/perl
To unsubscribe: http://lists.mysql.com/perl?unsub=gcdmp-msql-mysql-modules@m .gmane.org

Re: Can"t connect to local MySQL server through socket "/var/lib/mysql/mysql.sock" (13)

am 03.05.2006 23:15:38 von Arthur H Wakida

Mike,

Yes, mysql:mysql plus just for the heck of it 'rwx' for all.

Arthur

> Arthur,
> ----- Original Message -----
> From: "Arthur H Wakida"
> To: "Mike Blezien" ;
> Sent: Wednesday, May 03, 2006 3:51 PM
> Subject: Re: Can't connect to local MySQL server through socket
> '/var/lib/mysql/mysql.sock' (13)
>
>
>> Mike,
>>
>> Thank you very much for your quick response.
>> Unfortunately, mysql.sock is owned by mysql and on top of that I have
>> it opened for all (rwx). One more info, in messages log I see following
>> error : ... denied {connectto } for pid=7678 exe=/usr/bin/perl
>> path=/var/lib/mysql/mysql.sock
>> scontext=root:system_r:httpd_sys_script_t
>> tcontext=root:system_r:unconfied_t tclass=
>> unix_stream_socket
>> My data directory and /var/lib/mysql/mysql.sock is both owned by mysql.
>> Firewall is completely
>> disabled (lokkit). I don't know what else maybe blocking this connection.
>>
>> Arthur
>
> is the entire mysql folder and database folders owned by 'mysql.mysql' ??
>
> Mike
>
>
>>> Arthur,
>>>
>>> the Error 13 means Permission Denied. check the ownership of the sock
>>> file, is should be owned by the "mysql" user if owned by 'root', then
>>> this maybe causing your problems.
>>>
>>> Mike
>>> ----- Original Message -----
>>> From: "Arthur H Wakida"
>>> To:
>>> Sent: Wednesday, May 03, 2006 2:29 PM
>>> Subject: Can't connect to local MySQL server through socket
>>> '/var/lib/mysql/mysql.sock' (13)
>>>
>>>
>>> OS RH Enterprise V4 (kernel 2.5.9-5.EL), Perl 5.8.5, DBI-1.46,
>>> DBD-MySQL-2.9004-3.1, MySQL 4.1.7 installed
>>>
>>> I can access/update MySQL db via webmin (port 10000) and SQLyog (port
>>> 3306) without any problem.
>>>
>>> When I try to connect to MySQL db via ;
>>> my $hndl = DBI->connect("DBI:mysql:$database", $user, $password) or
>>> db_err("Unable to contect to $database", $DBI::errstr);
>>>
>>> I get the following message : "Can't connect to local MySQL server
>>> through socket '/var/lib/mysql/mysql.sock' (13)"
>>>
>>> Socket in question does exist in /var/lib/mysql and all directories
>>> involved is completely open (777). I've other servers up
>>> and running without any problem (albeit different versions). Did I miss
>>> something? Any help/ideas is greatly appreciated!
>>>
>>>
>>> --
>>> MySQL Perl Mailing List
>>> For list archives: http://lists.mysql.com/perl
>>> To unsubscribe: http://lists.mysql.com/perl?unsub=ahwakida@yamada.com
>>
>>
>> --
>> MySQL Perl Mailing List
>> For list archives: http://lists.mysql.com/perl
>> To unsubscribe:
>> http://lists.mysql.com/perl?unsub=mickalo@frontiernet.net
>>
>>


--
MySQL Perl Mailing List
For list archives: http://lists.mysql.com/perl
To unsubscribe: http://lists.mysql.com/perl?unsub=gcdmp-msql-mysql-modules@m .gmane.org

Re: Can"t connect to local MySQL server through socket "/var/lib/mysql/mysql.sock" (13)

am 03.05.2006 23:47:17 von w

Arthur, --

Could disabled SELinux work for you?
(/usr/sbin/setenforce Permissive)

Details:
http://bugs.mysql.com/bug.php?id=12676

--w


On Wed, May 03, 2006 at 02:15:38PM -0700, Arthur H Wakida wrote:
> Mike,
>
> Yes, mysql:mysql plus just for the heck of it 'rwx' for all.
>
> Arthur
>
> >Arthur,
> >----- Original Message -----
> >From: "Arthur H Wakida"
> >To: "Mike Blezien" ;
> >Sent: Wednesday, May 03, 2006 3:51 PM
> >Subject: Re: Can't connect to local MySQL server through socket
> >'/var/lib/mysql/mysql.sock' (13)
> >
> >
> >>Mike,
> >>
> >>Thank you very much for your quick response.
> >>Unfortunately, mysql.sock is owned by mysql and on top of that I have
> >>it opened for all (rwx). One more info, in messages log I see following
> >>error : ... denied {connectto } for pid=7678 exe=/usr/bin/perl
> >>path=/var/lib/mysql/mysql.sock
> >> scontext=root:system_r:httpd_sys_script_t
> >>tcontext=root:system_r:unconfied_t tclass=
> >> unix_stream_socket
> >>My data directory and /var/lib/mysql/mysql.sock is both owned by mysql.
> >>Firewall is completely
> >>disabled (lokkit). I don't know what else maybe blocking this connection.
> >>
> >>Arthur
> >
> >is the entire mysql folder and database folders owned by 'mysql.mysql' ??
> >
> >Mike
> >
> >
> >>>Arthur,
> >>>
> >>>the Error 13 means Permission Denied. check the ownership of the sock
> >>>file, is should be owned by the "mysql" user if owned by 'root', then
> >>>this maybe causing your problems.
> >>>
> >>>Mike
> >>>----- Original Message -----
> >>>From: "Arthur H Wakida"
> >>>To:
> >>>Sent: Wednesday, May 03, 2006 2:29 PM
> >>>Subject: Can't connect to local MySQL server through socket
> >>>'/var/lib/mysql/mysql.sock' (13)
> >>>
> >>>
> >>>OS RH Enterprise V4 (kernel 2.5.9-5.EL), Perl 5.8.5, DBI-1.46,
> >>>DBD-MySQL-2.9004-3.1, MySQL 4.1.7 installed
> >>>
> >>>I can access/update MySQL db via webmin (port 10000) and SQLyog (port
> >>>3306) without any problem.
> >>>
> >>>When I try to connect to MySQL db via ;
> >>> my $hndl = DBI->connect("DBI:mysql:$database", $user, $password) or
> >>>db_err("Unable to contect to $database", $DBI::errstr);
> >>>
> >>>I get the following message : "Can't connect to local MySQL server
> >>>through socket '/var/lib/mysql/mysql.sock' (13)"
> >>>
> >>>Socket in question does exist in /var/lib/mysql and all directories
> >>>involved is completely open (777). I've other servers up
> >>>and running without any problem (albeit different versions). Did I miss
> >>>something? Any help/ideas is greatly appreciated!

--
MySQL Perl Mailing List
For list archives: http://lists.mysql.com/perl
To unsubscribe: http://lists.mysql.com/perl?unsub=gcdmp-msql-mysql-modules@m .gmane.org

Re: Can"t connect to local MySQL server through socket "/var/lib/mysql/mysql.sock" (13)

am 04.05.2006 00:08:38 von Marco Wise

You may also want to take a look at the following fixes for the
SELinux policy:

https://rhn.redhat.com/errata/RHBA-2005-251.html (it lists what looks
like your problem) and the update that supercedes it:
https://rhn.redhat.com/errata/RHBA-2006-0049.html

Good luck!

- marco

On May 3, 2006, at 2:47 PM, Vladimir V. Kolpakov wrote:

> Arthur, --
>
> Could disabled SELinux work for you?
> (/usr/sbin/setenforce Permissive)
>
> Details:
> http://bugs.mysql.com/bug.php?id=12676
>
> --w
>
>
> On Wed, May 03, 2006 at 02:15:38PM -0700, Arthur H Wakida wrote:
>> Mike,
>>
>> Yes, mysql:mysql plus just for the heck of it 'rwx' for all.
>>
>> Arthur
>>
>>> Arthur,
>>> ----- Original Message -----
>>> From: "Arthur H Wakida"
>>> To: "Mike Blezien" ;
>>> Sent: Wednesday, May 03, 2006 3:51 PM
>>> Subject: Re: Can't connect to local MySQL server through socket
>>> '/var/lib/mysql/mysql.sock' (13)
>>>
>>>
>>>> Mike,
>>>>
>>>> Thank you very much for your quick response.
>>>> Unfortunately, mysql.sock is owned by mysql and on top of that I
>>>> have
>>>> it opened for all (rwx). One more info, in messages log I see
>>>> following
>>>> error : ... denied {connectto } for pid=7678 exe=/usr/bin/perl
>>>> path=/var/lib/mysql/mysql.sock
>>>> scontext=root:system_r:httpd_sys_script_t
>>>> tcontext=root:system_r:unconfied_t tclass=
>>>> unix_stream_socket
>>>> My data directory and /var/lib/mysql/mysql.sock is both owned by
>>>> mysql.
>>>> Firewall is completely
>>>> disabled (lokkit). I don't know what else maybe blocking this
>>>> connection.
>>>>
>>>> Arthur
>>>
>>> is the entire mysql folder and database folders owned by
>>> 'mysql.mysql' ??
>>>
>>> Mike
>>>
>>>
>>>>> Arthur,
>>>>>
>>>>> the Error 13 means Permission Denied. check the ownership of
>>>>> the sock
>>>>> file, is should be owned by the "mysql" user if owned by
>>>>> 'root', then
>>>>> this maybe causing your problems.
>>>>>
>>>>> Mike
>>>>> ----- Original Message -----
>>>>> From: "Arthur H Wakida"
>>>>> To:
>>>>> Sent: Wednesday, May 03, 2006 2:29 PM
>>>>> Subject: Can't connect to local MySQL server through socket
>>>>> '/var/lib/mysql/mysql.sock' (13)
>>>>>
>>>>>
>>>>> OS RH Enterprise V4 (kernel 2.5.9-5.EL), Perl 5.8.5, DBI-1.46,
>>>>> DBD-MySQL-2.9004-3.1, MySQL 4.1.7 installed
>>>>>
>>>>> I can access/update MySQL db via webmin (port 10000) and SQLyog
>>>>> (port
>>>>> 3306) without any problem.
>>>>>
>>>>> When I try to connect to MySQL db via ;
>>>>> my $hndl = DBI->connect("DBI:mysql:$database", $user,
>>>>> $password) or
>>>>> db_err("Unable to contect to $database", $DBI::errstr);
>>>>>
>>>>> I get the following message : "Can't connect to local MySQL server
>>>>> through socket '/var/lib/mysql/mysql.sock' (13)"
>>>>>
>>>>> Socket in question does exist in /var/lib/mysql and all
>>>>> directories
>>>>> involved is completely open (777). I've other servers up
>>>>> and running without any problem (albeit different versions).
>>>>> Did I miss
>>>>> something? Any help/ideas is greatly appreciated!
>
> --
> MySQL Perl Mailing List
> For list archives: http://lists.mysql.com/perl
> To unsubscribe: http://lists.mysql.com/perl?
> unsub=marco.wise@stanford.edu
>


--
MySQL Perl Mailing List
For list archives: http://lists.mysql.com/perl
To unsubscribe: http://lists.mysql.com/perl?unsub=gcdmp-msql-mysql-modules@m .gmane.org

Re: Can"t connect to local MySQL server through socket "/var/lib/mysql/mysql.sock" (13)

am 04.05.2006 00:19:23 von Arthur H Wakida

Valdimir!,

That's it! Thank you all soooo much!
Mike, Vladamir, Marco your efforts just saved my
sanity (of what I have remaining)! Thanks again.

Arthur

----- Original Message -----
From: "Vladimir V. Kolpakov"
To:
Sent: Wednesday, May 03, 2006 2:47 PM
Subject: Re: Can't connect to local MySQL server through socket
'/var/lib/mysql/mysql.sock' (13)


> Arthur, --
>
> Could disabled SELinux work for you?
> (/usr/sbin/setenforce Permissive)
>
> Details:
> http://bugs.mysql.com/bug.php?id=12676
>
> --w
>
>
> On Wed, May 03, 2006 at 02:15:38PM -0700, Arthur H Wakida wrote:
>> Mike,
>>
>> Yes, mysql:mysql plus just for the heck of it 'rwx' for all.
>>
>> Arthur
>>
>> >Arthur,
>> >----- Original Message -----
>> >From: "Arthur H Wakida"
>> >To: "Mike Blezien" ;
>> >Sent: Wednesday, May 03, 2006 3:51 PM
>> >Subject: Re: Can't connect to local MySQL server through socket
>> >'/var/lib/mysql/mysql.sock' (13)
>> >
>> >
>> >>Mike,
>> >>
>> >>Thank you very much for your quick response.
>> >>Unfortunately, mysql.sock is owned by mysql and on top of that I have
>> >>it opened for all (rwx). One more info, in messages log I see
>> >>following
>> >>error : ... denied {connectto } for pid=7678 exe=/usr/bin/perl
>> >>path=/var/lib/mysql/mysql.sock
>> >> scontext=root:system_r:httpd_sys_script_t
>> >>tcontext=root:system_r:unconfied_t tclass=
>> >> unix_stream_socket
>> >>My data directory and /var/lib/mysql/mysql.sock is both owned by mysql.
>> >>Firewall is completely
>> >>disabled (lokkit). I don't know what else maybe blocking this
>> >>connection.
>> >>
>> >>Arthur
>> >
>> >is the entire mysql folder and database folders owned by 'mysql.mysql'
>> >??
>> >
>> >Mike
>> >
>> >
>> >>>Arthur,
>> >>>
>> >>>the Error 13 means Permission Denied. check the ownership of the sock
>> >>>file, is should be owned by the "mysql" user if owned by 'root', then
>> >>>this maybe causing your problems.
>> >>>
>> >>>Mike
>> >>>----- Original Message -----
>> >>>From: "Arthur H Wakida"
>> >>>To:
>> >>>Sent: Wednesday, May 03, 2006 2:29 PM
>> >>>Subject: Can't connect to local MySQL server through socket
>> >>>'/var/lib/mysql/mysql.sock' (13)
>> >>>
>> >>>
>> >>>OS RH Enterprise V4 (kernel 2.5.9-5.EL), Perl 5.8.5, DBI-1.46,
>> >>>DBD-MySQL-2.9004-3.1, MySQL 4.1.7 installed
>> >>>
>> >>>I can access/update MySQL db via webmin (port 10000) and SQLyog (port
>> >>>3306) without any problem.
>> >>>
>> >>>When I try to connect to MySQL db via ;
>> >>> my $hndl = DBI->connect("DBI:mysql:$database", $user, $password)
>> >>> or
>> >>>db_err("Unable to contect to $database", $DBI::errstr);
>> >>>
>> >>>I get the following message : "Can't connect to local MySQL server
>> >>>through socket '/var/lib/mysql/mysql.sock' (13)"
>> >>>
>> >>>Socket in question does exist in /var/lib/mysql and all directories
>> >>>involved is completely open (777). I've other servers up
>> >>>and running without any problem (albeit different versions). Did I
>> >>>miss
>> >>>something? Any help/ideas is greatly appreciated!
>
> --
> MySQL Perl Mailing List
> For list archives: http://lists.mysql.com/perl
> To unsubscribe: http://lists.mysql.com/perl?unsub=ahwakida@yamada.com


--
MySQL Perl Mailing List
For list archives: http://lists.mysql.com/perl
To unsubscribe: http://lists.mysql.com/perl?unsub=gcdmp-msql-mysql-modules@m .gmane.org