LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 04-25-2012, 02:45 PM   #16
emir.cortes
LQ Newbie
 
Registered: Apr 2012
Posts: 1

Rep: Reputation: Disabled

I had the same problem on a virtual machine running Ubuntu. After reading allenhighnote message, I realized my silly mistake.
I had changed the file: /etc/mysql/my.cnf to set bind-address to the IP that at that moment the virtual machine had, but when the DHCP assigned another IP the my.cnf was no longer valid.

Solution: I changed the bind-address.
 
Old 08-26-2012, 06:35 PM   #17
jeffpeck
LQ Newbie
 
Registered: Oct 2007
Posts: 14

Rep: Reputation: 1
You need to make sure MySQL is running:

sudo /etc/init.d/mysqld start
 
1 members found this post helpful.
Old 05-06-2013, 01:40 PM   #18
codymham
LQ Newbie
 
Registered: May 2013
Posts: 1

Rep: Reputation: Disabled
Smile Worked

Running /etc/init.d/mysqld start worked for me.
I guess mysql had stopped.
 
Old 07-05-2013, 11:31 AM   #19
KazaJhodo
LQ Newbie
 
Registered: Jul 2013
Posts: 1

Rep: Reputation: Disabled
Most Common Cause

There are various things that can cause this issue- obviously since we have so many different solutions being presented. I troubleshoot sites for a living and this is what I find to be the most common reason for this error.


When sql runs it creates temp files, one of these is the sock file mentioned within this error. Within your my.cnf file it is specified where sql attempts to find/write this file.

First check your system to see where my.cnf is, if you can't find it- its because sql is not running and hasn't ran in the past. Check the path specific in your my.cnf, then check the owners on that directory. Usually this happens because the owners permissions are not quite right. Such as a mysql:root ownership.

To fix it, simply run a chown mysql:mysql directoryname. Restart sql, service restart mysql, /etc/init.d/mysql restart, /etc/init.d/mysqld restart - usually one of those variations on linux.

Hopefully this helps save some time. As I said there are numerous reasons, I find this is the most common. Especially if you've moved the install to another server.
 
Old 03-06-2014, 07:19 AM   #20
Pineiden
LQ Newbie
 
Registered: Mar 2014
Posts: 1

Rep: Reputation: Disabled
Hello, i solved that:

1.- In my.cnf changue 'localhost ip' to your IP (where you have your site installed)
2.- In mysql environment (when you access by mysql -u root -p) you give access to users not using 'localhost', use your IP.
3.- In your 'settings' or 'configuration' file (if you are using Wordpress, drupal,etc) you have to change 'loccalhost' for 'Your IP'

Then you have a correct conecction.

I think if you ddeactivate innodb it loss sense use mysql beacuse it's designed for innodb
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql. NoviceW Linux - Networking 17 09-17-2014 02:13 PM
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
Problems with MySQL on SuSE: Can't Connect (/var/lib/mysql/mysql.sock) neocookie Linux - Software 8 02-07-2008 11:48 PM
Buzilla issue: "Can't connect to local MySQL server through socket '/tmp/mysql.sock'" vitopn Linux - General 3 05-21-2007 10:13 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

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

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