LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 03-22-2005, 03:23 PM   #1
vitopn
LQ Newbie
 
Registered: Feb 2005
Location: San Francisco, CA
Posts: 3

Rep: Reputation: 0
Buzilla issue: "Can't connect to local MySQL server through socket '/tmp/mysql.sock'"


OS: FC3
Perl: 5.8.5
mysql : Ver 14.7 Distrib 4.1.10a
Apache: 2.0
Bugzilla: 2.18

When click the login button on the bugzilla front page I get the error:

DBI connect('host=localhost;database=bugs;port=3306','bugs',...) failed: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (13) at /usr/lib/perl5/vendor_perl/5.8.3/i386-linux-thread-multi/DBI.pm line 597
DBI::__ANON__('undef', 'undef') called at /usr/lib/perl5/vendor_perl/5.8.3/i386-linux-thread-multi/DBI.pm line 648
DBI::connect('DBI', 'DBI:mysql:host=localhost;database=bugs;port=3306', '', '', 'HASH(0x9e9b38c)') called at Bugzilla/DB.pm line 146
Bugzilla::DB::_connect('DBI:mysql:host=localhost;database=bugs;port=3306') called at Bugzilla/DB.pm line 138
Bugzilla::DB::connect_main() called at Bugzilla.pm line 143
Bugzilla::dbh('Bugzilla') called at Bugzilla/Auth/CGI.pm line 154
Bugzilla::Auth::CGI::login('Bugzilla::Auth::CGI', 2) called at Bugzilla.pm line 74
Bugzilla::login('Bugzilla', 2) called at /var/www/html/bugzilla/query.cgi line 61
at Bugzilla/DB.pm line 146


I've temporarially removed the bugzilla db user's (bugs) password.

I have tested that mysql is working with the following command:
mysql -u bugs -S/tmp/mysql.sock -P3306

The socket file is there and the permissions seem wide open

[root@Sydney tmp]# ls -l /tmp/mysql.sock
srwxrwxrwx 1 mysql mysql 0 Mar 22 12:01 /tmp/mysql.sock


Any thoughts?
 
Old 03-22-2005, 05:13 PM   #2
vitopn
LQ Newbie
 
Registered: Feb 2005
Location: San Francisco, CA
Posts: 3

Original Poster
Rep: Reputation: 0
More Info

Since the original post I asked some friends for help. One mentioned that I should try it with a db password set for bugs (bugzilla's db user), so I set the password to"vtest" both in the "/var/www/html/bugzilla/localconfig" and in mysql.


One also gave me a perl script to test with:

#!/usr/bin/perl -w

use DBI;
use strict;

my $dbh = DBI->connect('DBI:mysql:bugs:localhost',
'bugs', # username
'vtest', # password
);
if (!$dbh) { die "Cannot connect to database" }
my $query = 'select count(*) from attachments';
my $sth = $dbh->prepare($query);
if (!$sth) { die "Illegal query; $query" };
$sth->execute;
while (my @row=$sth->fetchrow_array) {
print "$row[0]\n";
}
$sth->finish;


The script worked fine.



Other friend had me change my host file from :
127.0.0.1 localhost.localdomain localhost

to

127.0.0.1 localhost localhost.localdomain


to ensure that it was using bugs@localhost to login (instead of bugs@localhost.localdomain).

I should also mention that I installed bugzilla and mysql manually (without the rpms).

I've tried all of this and I am still getting the same error. Any help would be appreciated.

Thank you.
 
Old 05-21-2007, 02:59 AM   #3
fudy
LQ Newbie
 
Registered: May 2007
Location: Tokyo
Posts: 1

Rep: Reputation: 0
Has this problem cleared?
Recently I met the same question with you.So I wonder if you
has solved it.

Additionally, my OS is right FC3, too. It seems reasonable to
throw our doubt on FC3...

Last edited by fudy; 05-21-2007 at 03:01 AM.
 
Old 05-21-2007, 10:13 AM   #4
vitopn
LQ Newbie
 
Registered: Feb 2005
Location: San Francisco, CA
Posts: 3

Original Poster
Rep: Reputation: 0
RE: Has this problem cleared?

Hmm. That post was over 2 years ago .. I can't remember the details of how we resolved it but we did. I believe that in the end we downloaded the rpms and installed using them.

Good luck.
-Vito
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock welery Linux - Software 19 03-06-2014 07:19 AM
ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql. NoviceW Linux - Networking 16 12-10-2012 02:34 AM
ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql. suziecorbett Linux - Software 8 10-09-2008 01:52 AM
mysql error Can't connect to local MySQL server through socket '/var/lib/mysql/mysql. Dannux Linux - Software 3 03-24-2006 08:44 AM
can't connect to mysql through socket '/tmp/mysql.sock' Boby Programming 2 05-23-2004 01:32 PM


All times are GMT -5. The time now is 05:37 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration