LinuxQuestions.org
Visit Jeremy's Blog.
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 04-18-2011, 08:44 AM   #1
thoufiq
LQ Newbie
 
Registered: Apr 2011
Posts: 22

Rep: Reputation: Disabled
Can't connect to local MySql server through socket '/var/run/mysqld/mysqld.sock' (2)


Hi All,
I am very very new to linux and installing mysql server manually. i have successfully installed mysql server but when i am try to create database, it shows error like this

ERROR 2002 (HY000): Can't connect to local MySql server through socket '/var/run/mysqld/mysqld.sock' (2)

** mysqld is not available in /var/run and error log file is also not available in /var/log **

Any suggestions will be appreciated..

Thanks
 
Old 04-18-2011, 08:51 AM   #2
jschiwal
Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654
I sounds like the mysqld service isn't running.
 
1 members found this post helpful.
Old 04-18-2011, 12:25 PM   #3
lrtward
Member
 
Registered: Feb 2011
Distribution: CentOS, Ubuntu
Posts: 97

Rep: Reputation: 9
Agree with jschiwal. Every time I've seen that error it's because msyqld isn't running.

Code:
/etc/init.d mysqld start
 
Old 04-18-2011, 01:05 PM   #4
vijayjohnyjohn
LQ Newbie
 
Registered: Mar 2010
Posts: 2

Rep: Reputation: 0
use netstat -lntp | grep mysqld .
Confirm that mysqld is running & than try to connect..!
Chau
 
Old 04-19-2011, 04:35 AM   #5
thoufiq
LQ Newbie
 
Registered: Apr 2011
Posts: 22

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by jschiwal View Post
I sounds like the mysqld service isn't running.
Thanks for your suggestion. Anyway when using /etc/init.d mysqld start and sudo service mysql start, it shows like this

root@dhcppc4:~# sudo service start
mysql : unrecognized sevice

root@dhcppc4:~#sudo /etc/init.d mysqld start
sudo : /etc/init.d: command not found

root@dhcppc4:~#sudo /etc/init.d/mysqld start
sudo : /etc/init.d/mysqld: command not found


Also can u pls briefly explain, why log file and mysqld is not present in var/log/... and var/run/...
 
  


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
[SOLVED] MySQL Start Problem::::socket '/var/run/mysqld/mysqld.sock' (2) arun-linux Linux - Software 6 11-29-2012 06:56 AM
[SOLVED] Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' Burningmace Linux - Server 5 09-06-2012 01:29 AM
HTTPD: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' markseger Fedora - Installation 2 02-09-2011 11:53 PM
Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) sawgata Linux - Newbie 9 06-02-2010 06:31 AM
Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (13) Pode Slackware 12 11-26-2008 08:21 AM


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