hosted by liquidweb


Go Back   Web Hosting Talk : Web Hosting Main Forums : Hosting Security and Technology : ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.
Reply

Hosting Security and Technology Configuring and optimizing web hosting servers and operating systems, developing administration scripts, building servers, protecting against hackers, and general security (SSL certificates, etc.)
Forum Jump

ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.

Reply Post New Thread In Hosting Security and Technology Subscription
 
Send news tip View All Posts Thread Tools Search this Thread Display Modes
  #1  
Old 05-10-2004, 06:53 AM
atul atul is offline
Web Hosting Guru
 
Join Date: Apr 2004
Location: India
Posts: 292

ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.


Hello all,
I am having problem in connecting mysql database :
When I typed mysql -u root at shell prompt: I got the error..
ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
I ahve checked for file mysql.sock in mysql directory ..it isn't there..
I have changed permissions of folder mysql to 777..
changed owner and grp of all files under mysql folder to mysql...
I even tried mysqld_safe but didn't work at all...
Below I am pasting my /etc/my.cnf file for checking...
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock

[mysql.server]
user=mysql
basedir=/var/lib

[safe_mysqld]
err-log=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid

Can anybody help me out?

Reply With Quote


Sponsored Links
  #2  
Old 05-10-2004, 09:15 AM
pmabraham pmabraham is offline
Web Hosting Master
 
Join Date: Dec 2001
Posts: 5,221
Greetings:

I am not sure if this will work now given the modifications you did already.

But have you tried simply stopping and restaring the mysql service?

Thank you.

__________________
---
Peter M. Abraham
LinkedIn Profile


Reply With Quote
  #3  
Old 05-10-2004, 10:02 AM
atul atul is offline
Web Hosting Guru
 
Join Date: Apr 2004
Location: India
Posts: 292
yes dynamicnet
i tried it.
Strange thing is that there is no restart in /etc/init.d/mysql .
Ok there is something I didn't tell you about..
yesterday only I uograded cpanel with /scripts/upcp ..
and I think since then I got this error..I am very sure but I think it could be because of that or else ?
when I typed /etc/init.d/mysql stop i got this on my screen..
safe_mysqld mysqld mysqld_safe mysql
And then i typed /etc/init.d/mysql start
nothing happened at all..
I know musqld isn't running..
But I am able to trace error..
Please help dynamicnet
thank you

Reply With Quote
Sponsored Links
  #4  
Old 05-10-2004, 10:04 AM
pmabraham pmabraham is offline
Web Hosting Master
 
Join Date: Dec 2001
Posts: 5,221
Greetings:

The forums are limited in terms of how much help can be provided (of note there are several companies that can provide help that participate in WHT --- granted for a fee).

Check in the mysql source directory for a scripts or support-files area. That should have the "mysql.server" start up script.

Thank you.

__________________
---
Peter M. Abraham
LinkedIn Profile


Reply With Quote
  #5  
Old 05-10-2004, 10:07 AM
atul atul is offline
Web Hosting Guru
 
Join Date: Apr 2004
Location: India
Posts: 292
Hello,
Should I restart server now because now eximstats also failed..
/etc/init.d/exim start
error:
exim eximCould not create INET socket: Address already in use IO:ocket::INET: Address already in use
Please help
thank you

Reply With Quote
  #6  
Old 05-11-2004, 12:24 AM
nightwar nightwar is offline
Junior Guru Wannabe
 
Join Date: Dec 2003
Location: Mentor, Ohio
Posts: 38
shouldnt it be
/etc/rc.d/init.d/mysqld ?

that error usualy happens when mysqld isnt running, type
ps -aux | grep mysql

see if its running

__________________
Compaq Linux Forums!
http://www.cpqforums.com

Reply With Quote
Reply

Related posts from TheWhir.com
Title Type Date Posted
New on WHIR TV: Video from WHIR Networking Events Europe Whir Tv 2012-07-24 16:24:36
Web Host Rackspace Launches Private Beta for MySQL Cloud Database Web Hosting News 2011-12-01 21:09:51
Parallels Now Offering Licenses for CloudLinux OS Web Hosting News 2011-10-26 17:29:25
Web Hosting Software Firm CloudLinux Releases CloudLinux OS Version 6.1 Web Hosting News 2011-09-13 14:08:49
Web Host FireHost Partners with Cloud Security Firm Gazzang for Data Encryption Web Hosting News 2011-08-16 20:33:43


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes
Postbit Selector

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

Forum Jump
Login:
Log in with your username and password
Username:
Password:



Forgot Password?
Advertisement:
Web Hosting News:



 

X

Welcome to WebHostingTalk.com

Create your username to jump into the discussion!

WebHostingTalk.com is the largest, most influentual web hosting community on the Internet. Join us by filling in the form below.


(4 digit year)

Already a member?