LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 10-07-2012, 01:42 PM   #1
doctorcisco
Member
 
Registered: Nov 2003
Posts: 70

Rep: Reputation: 17
MySQL Refusing Connections from Localhost


My mail server (Ubuntu 10.04) uses mysql for virtual domains, virtual users. For some reason, mysqld has started refusing connections from localhost. I see these in the mail server log:

Oct 6 00:31:14 apollo postfix/trivial-rewrite[16888]: fatal: proxy:mysql:/etc/postfix/mysql-virtual_domains.cf(0,lock|fold_fix): table lookup problem

and:

Oct 7 13:39:15 apollo postfix/proxymap[25839]: warning: connect to mysql server 127.0.0.1: Lost connection to MySQL server at 'reading initial communication packet', system error: 0


I also get the following in auth.log:
Oct 6 22:33:31 apollo mysqld[31775]: refused connect from 127.0.0.1

Telnet to the local port:

root@apollo:/var/log/mysql# telnet localhost 3306
Trying ::1...
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
Connection closed by foreign host.
root@apollo:/var/log/mysql#

I am not sure why this started happening, but there was a disk failure in a RAID 1 pair a bit earlier that day. So it's possible I have a damaged config file or something. But mail was working for at least an hour after the drive event, so who knows for sure?

phpmyadmin works fine, and the databases themselves look like they're intact.

I think/believe that selinux and iptables are disabled and not running. So ... why is mysqld refusing connections from localhost? What should I check? What processes might cause this if a .conf file or possibly a binary was damaged? Which other log files might contain clues? I've enabled "general logging" in /etc/mysql/my.cnf, but I get no interesting or informative entries there.

Thanks,
doctorcisco
 
Old 10-07-2012, 11:44 PM   #2
jsaravana87
Member
 
Registered: Aug 2011
Location: Chennai,India
Distribution: Redhat,Centos,Ubuntu,Dedian
Posts: 558
Blog Entries: 5

Rep: Reputation: Disabled
Hi
Quote:
Oct 6 22:33:31 apollo mysqld[31775]: refused connect from 127.0.0.1



Do you check your my.cnf file .I Guess mysql is not listening on localhost
 
Old 10-08-2012, 01:21 AM   #3
zhjim
Senior Member
 
Registered: Oct 2004
Distribution: Debian Squeeze x86_64
Posts: 1,748
Blog Entries: 11

Rep: Reputation: 233Reputation: 233Reputation: 233
Sometimes 127.0.0.1 and localhost mean different things to mysql. Can you give us the output of
Code:
select * from mysql.user where user = "your_mail_user"
Also see if you have damaged tables. Which might be the case cause of disk failure. See mysql doc for how to do it.
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Privoxy refusing connections Badfish Linux - Networking 7 05-29-2007 10:29 PM
Refusing connections? linker1981 Linux - Networking 4 07-19-2006 09:16 AM
keep refusing connections tpark Linux - Networking 1 03-04-2004 02:24 AM
Refusing Connections goldfish Linux - Newbie 16 10-09-2003 06:13 PM
Telnet yet again. (refusing connections) hornokplease Linux - Networking 2 07-21-2003 03:30 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 01:59 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration