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

"Vladimir V. Kolpakov" <[email protected]>
Newsgroups gmane.comp.db.mysql.perl
Message-ID <[email protected]>
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" <[email protected]>
> >To: "Mike Blezien" <[email protected]>; <[email protected]>
> >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" <[email protected]>
> >>>To: <[email protected]>
> >>>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/[email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.