LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 09-08-2009, 03:30 PM   #1
Burningmace
LQ Newbie
 
Registered: Sep 2009
Posts: 2

Rep: Reputation: 0
Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock'


My website's hosting is throwing the following error when trying to connect via a subdomain using 'localhost' as the MySQL host:

Code:
Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
On other subdomains, we connect to MySQL using the full URL (e.g. forums.domain.com) but when I do that with this new domain I get the following error:

Code:
Lost connection to MySQL server at 'reading initial communication packet', system error: 111
I also tried using "domain.com" as the server, and that also resulted in an error 111.

Any ideas?
 
Old 09-09-2009, 04:27 AM   #2
alexroux
LQ Newbie
 
Registered: Sep 2009
Location: Lausanne (Switzerland)
Distribution: Ubuntu
Posts: 12

Rep: Reputation: 3
The first error (2 -> No such file or directory ) comes from the fact that you have no mysql server running on localhost.

The second one (111 -> Connection refused) shows that either mysql port is blocked (firewall for instance) or that no mysql server is running on forums.domain.com.

Are you sure that the machine with mysql server is reachable from your new subdomain? If not, you have found your problem. Be also sure to use the correct url to join the mysql server.
 
2 members found this post helpful.
Old 09-10-2009, 06:15 AM   #3
Burningmace
LQ Newbie
 
Registered: Sep 2009
Posts: 2

Original Poster
Rep: Reputation: 0
For some reason when we deleted the schema and the associated MySQL account from their control panel and then re-created it, it worked fine. Doesn't really make any sense at all, but our hosting is often quite glitchy with stuff like this. I get the feeling that the config files weren't updated properly to allow access to the other domain.
 
Old 09-11-2009, 01:41 AM   #4
xiutuo
Member
 
Registered: Mar 2008
Posts: 52

Rep: Reputation: 15
I think there are two mysql server...
and the lib file: libmysqlclient.so** at the same path .
1. mysql server one: install by yum or rpm with os cdrom
2. mysql server two: install by source...
there are infilct between the mysqlclient.so
 
Old 09-09-2011, 12:12 PM   #5
rbucks
LQ Newbie
 
Registered: Sep 2011
Posts: 1

Rep: Reputation: Disabled
check df

Hey guys, I had this problem and googled and googled. Then I ran df and saw that my disk was 100% full. So test that before you pull any more hair out.

This was the error I had that wouldn't let me get into MySQL. I couldn't find mysqld.sock because the system had no disk space to write it!

error: 'Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (111)'
 
1 members found this post helpful.
Old 09-06-2012, 02:29 AM   #6
SunnyDaze
LQ Newbie
 
Registered: Apr 2005
Distribution: Real geeks know Linux is Linux (Ubuntu, Suse, Mandriva, etc....)
Posts: 5

Rep: Reputation: 0
I was suspecting a full root file system was causign all my problems. When I saw rbucks comment, I knew my instincts must be right, so I went on a quest to remove files that were no longer needed. On my Ubuntu 10.04 system, this simple command cleared up over 400Meg of files that no longer were needed, and got the system up an running.

Code:
sudo apt-get autoremove

Last edited by SunnyDaze; 09-06-2012 at 02:30 AM. Reason: Corrected typos
 
  


Reply

Tags
error, mysql, subdomain


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 Off
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 08:19 AM
Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (13) Pode Slackware 12 11-26-2008 09:21 AM
Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' mohadesz Linux - Server 3 03-15-2008 06:06 AM
Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' mathimca05 Linux - Newbie 2 10-17-2007 03:04 AM
Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) sunlinux Linux - Software 1 11-07-2006 01:08 AM


All times are GMT -5. The time now is 08:30 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