LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 07-29-2010, 02:30 AM   #1
arun-linux
LQ Newbie
 
Registered: Feb 2008
Posts: 17

Rep: Reputation: 0
Post MySQL Start Problem::::socket '/var/run/mysqld/mysqld.sock' (2)


Hello Folks,

I am Using Ubuntu lucid10.04,I have installed MySQL-client-core-5.1

It worked fine for 1 day after installation but when i started linux next day and login to connect,it could not get connected citing this message:

Code:
mysql
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
______________________________________________________________________
MySQL-workbench login message:
Your connection attempt failed for user 'root' from your host to server at 127.0.0.1:3306:
Lost connection to MySQL server at 'reading initial communication packet', system error: 111

Please:
1 Check that mysql is running on server 127.0.0.1
2 Check that mysql is running on port 3306 (note: 3306 is the default, but this can be changed)
3 Check the root has rights to connect to 127.0.0.1 from your address (mysql rights define what clients can connect to the server and from which machines)
4 Make sure you are both providing a password if needed and using the correct password for 127.0.0.1 connecting from the host address you're connecting from
_____________________________________________________________________


Looking forward for your replies.

--
Regards
Arun
 
Old 07-29-2010, 03:01 AM   #2
konzo
Member
 
Registered: Dec 2008
Location: Bulgaria
Distribution: Debian / Slackware / Ubuntu
Posts: 230

Rep: Reputation: 33
I have had exactly the same problem and I couldn't solve it after two days of trying. I reinstalled since I have fresh install. After install firest I check to backup this socket file but it is some s file and when I tar on it archove seems to be empty.
Code:
/var/run/mysqld/
total 5
drwxr-xr-x  2 mysql root   112 2010-07-29 09:42 ./
drwxr-xr-x 17 root  root  1168 2010-07-29 10:08 ../
-rw-rw----  1 mysql mysql    5 2010-07-29 09:42 mysqld.pid
srwxrwxrwx  1 mysql mysql    0 2010-07-29 09:42 mysqld.sock
I found on internet that I have to reinstall mysql-common, but that didn't help for my problem.

Also try to run mysql with -p and -u parameters (password and user, see --help), but I doubt that will help. In mysql site is a lot of posts on that problem but with no solution(as far for me).
 
Old 07-29-2010, 03:17 AM   #3
bathory
Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 10,922

Rep: Reputation: 1327Reputation: 1327Reputation: 1327Reputation: 1327Reputation: 1327Reputation: 1327Reputation: 1327Reputation: 1327Reputation: 1327Reputation: 1327
You should check if mysqld is running:
Code:
ps -ef|grep mysqld
If it's running, check my.cnf to see where the socket should be for both nysqld (the daemon) and mysql (the client)
 
Old 07-29-2010, 06:06 AM   #4
arun-linux
LQ Newbie
 
Registered: Feb 2008
Posts: 17

Original Poster
Rep: Reputation: 0
Post Output: ps -ef|grep mysqld

@Konzo : Thanks for sharing your problem.But i am still juggling with my problem,require more deep insight for problem.

I already tried re-installation of MySQL but that doesn't help me & problem is still not resolved.
_____________________________________________________________________

Code:
iit@iit-desktop:~$ ps -ef|grep mysqld
iit       6385  4064  0 16:10 pts/1    00:00:00 grep --color=auto mysqld
______________________________________________________________________


After reinstalling MySQL-client-core-5.1,ouput of ps -ef|grep mysqld
______________________________________________________________
Quote:
ps -ef|grep mysqld
iit 6465 1554 0 16:21 ? 00:00:02 /usr/bin/gtk-gnash -x 78946081 -j 300 -k 250 -u http://pagead2.googlesyndication.com...EyCNk3wk0DcY9F -F 82 -U http://googleads.g.doubleclick.net/p...xquestions.org -P allowscriptaccess=never -P flashvars=clickTAG=http://googleads.g.doubleclick.net/aclk%3Fsa%3Dl%26ai%3DBq1GcIV1RTJnbH8WVcI3CtZ4Bq8ikvQGLws7wFavbrcVD0Iz1AxABGAEgj5z0ATgAUKuj6qH9_____w Fg5cLkg6QOsgEWd3d3LmxpbnV4cXVlc3Rpb25zLm9yZ7oBCjMwMHgyNTBfYXPIAQTaAXpodHRwOi8vd3d3LmxpbnV4cXVlc3Rpb2 5zLm9yZy9xdWVzdGlvbnMvbGludXgtc29mdHdhcmUtMi9teXNxbC1zdGFydC1wcm9ibGVtLXNvY2tldC12YXItcnVuLW15c3FsZC 1teXNxbGQtc29jay0yLWEtODIyNzg1L6kC5AM-Fkz_Vj64AhjAAgHIArvqsROoAwHoA90F6AMF9QMCAABE%26num%3D1%26sig%3DAGiWqtxbVt6G0XgEq6V5F8fjfzEImcg2PQ%26 client%3Dca-pub-4420048478783872%26adurl%3Dhttp://track.quasar.co.in/trackQ/trkBanner1.asp%253FBanner%253DBeat_Google_Tech%2526Creative%253DTILYOI2%2526Camp%253DGM_BeatTILYOI2_ Jul10%2526Publisher%253DGoogle%2526Advertiser%253DGM_BeatTILYOI2_Jul10%2526Link%253Dhttp://chevybeat.co.in/test-drive.aspx -P height=250 -P id=google_flash_embed -P pluginspage=http://www.macromedia.com/go/getflashplayer -P src=http://pagead2.googlesyndication.com/pagead/imgad?id=CJCYhouV1_qWgQEQrAIY-gEyCNk3wk0DcY9F -P type=application/x-shockwave-flash -P width=300 -P wmode=opaque -
iit 6778 4064 0 16:31 pts/1 00:00:00 grep --color=auto mysqld
iit@iit-desktop:~$
_________________________________________________________________

Still looking for feasible solutions,please post more replies.

Looking forward for your replies.

--
Regards
Arun

Last edited by arun-linux; 07-29-2010 at 06:12 AM.
 
Old 07-29-2010, 07:57 AM   #5
bathory
Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 10,922

Rep: Reputation: 1327Reputation: 1327Reputation: 1327Reputation: 1327Reputation: 1327Reputation: 1327Reputation: 1327Reputation: 1327Reputation: 1327Reputation: 1327
So mysqld is not running, so it can create the socket.
Install mysql-server and start mysqld by running:
Code:
sudo /etc/init.d/mysql start
and see if the socket is created

Last edited by bathory; 07-29-2010 at 08:00 AM.
 
Old 08-02-2010, 12:12 AM   #6
arun-linux
LQ Newbie
 
Registered: Feb 2008
Posts: 17

Original Poster
Rep: Reputation: 0
Smile mysqld.sock created: Problem resolved

@bathory: Thanks for your Intellectuality,your suggestion worked.

_________________________________________________________________
Code:
iit@iit-desktop:~$ sudo apt-get install mysql-server
[sudo] password for iit: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following extra packages will be installed:
  libmysqlclient16 mysql-client-5.1 mysql-client-core-5.1 mysql-common
  mysql-server-5.1 mysql-server-core-5.1
Suggested packages:
  tinyca mailx
The following packages will be REMOVED:
  mysql-client
The following NEW packages will be installed:
  mysql-server mysql-server-5.1
The following packages will be upgraded:
  libmysqlclient16 mysql-client-5.1 mysql-client-core-5.1 mysql-common
  mysql-server-core-5.1
5 upgraded, 2 newly installed, 1 to remove and 4 not upgraded.
Need to get 22.2MB of archives.
After this operation, 15.0MB of additional disk space will be used.
Do you want to continue [Y/n]? y
Get:1 http://mirror.cse.iitd.ernet.in/ubuntu/ lucid-proposed/main mysql-common 5.1.41-3ubuntu12.6 [97.7kB]
Get:2 http://mirror.cse.iitd.ernet.in/ubuntu/ lucid-proposed/main libmysqlclient16 5.1.41-3ubuntu12.6 [1,932kB]
Get:3 http://mirror.cse.iitd.ernet.in/ubuntu/ lucid-proposed/main mysql-client-core-5.1 5.1.41-3ubuntu12.6 [177kB]
Get:4 http://mirror.cse.iitd.ernet.in/ubuntu/ lucid-proposed/main mysql-client-5.1 5.1.41-3ubuntu12.6 [8,138kB]
Get:5 http://mirror.cse.iitd.ernet.in/ubuntu/ lucid-proposed/main mysql-server-core-5.1 5.1.41-3ubuntu12.6 [4,712kB]
Get:6 http://mirror.cse.iitd.ernet.in/ubuntu/ lucid-proposed/main mysql-server-5.1 5.1.41-3ubuntu12.6 [7,008kB]
Get:7 http://mirror.cse.iitd.ernet.in/ubuntu/ lucid-proposed/main mysql-server 5.1.41-3ubuntu12.6 [93.6kB]
Fetched 22.2MB in 2s (11.0MB/s)             
Preconfiguring packages ...
(Reading database ... 420834 files and directories currently installed.)
Removing mysql-client ...
(Reading database ... 420831 files and directories currently installed.)
Preparing to replace mysql-common 5.1.41-3ubuntu12.5 (using .../mysql-common_5.1.41-3ubuntu12.6_all.deb) ...
Unpacking replacement mysql-common ...
Preparing to replace libmysqlclient16 5.1.41-3ubuntu12.5 (using .../libmysqlclient16_5.1.41-3ubuntu12.6_i386.deb) ...
Unpacking replacement libmysqlclient16 ...
Preparing to replace mysql-client-core-5.1 5.1.41-3ubuntu12.5 (using .../mysql-client-core-5.1_5.1.41-3ubuntu12.6_i386.deb) ...
Unpacking replacement mysql-client-core-5.1 ...
Preparing to replace mysql-client-5.1 5.1.41-3ubuntu12.5 (using .../mysql-client-5.1_5.1.41-3ubuntu12.6_i386.deb) ...
Unpacking replacement mysql-client-5.1 ...
Preparing to replace mysql-server-core-5.1 5.1.41-3ubuntu12.5 (using .../mysql-server-core-5.1_5.1.41-3ubuntu12.6_i386.deb) ...
Unpacking replacement mysql-server-core-5.1 ...
Processing triggers for man-db ...
Setting up mysql-common (5.1.41-3ubuntu12.6) ...
Selecting previously deselected package mysql-server-5.1.
(Reading database ... 420831 files and directories currently installed.)
Unpacking mysql-server-5.1 (from .../mysql-server-5.1_5.1.41-3ubuntu12.6_i386.deb) ...
Selecting previously deselected package mysql-server.
Unpacking mysql-server (from .../mysql-server_5.1.41-3ubuntu12.6_all.deb) ...
Processing triggers for ureadahead ...
ureadahead will be reprofiled on next reboot
Processing triggers for man-db ...
Setting up libmysqlclient16 (5.1.41-3ubuntu12.6) ...

Setting up mysql-client-core-5.1 (5.1.41-3ubuntu12.6) ...
Setting up mysql-client-5.1 (5.1.41-3ubuntu12.6) ...
Setting up mysql-server-core-5.1 (5.1.41-3ubuntu12.6) ...
Setting up mysql-server-5.1 (5.1.41-3ubuntu12.6) ...
Installing new version of config file /etc/init/mysql.conf ...
mysql start/running, process 3075

Setting up mysql-server (5.1.41-3ubuntu12.6) ...
Processing triggers for libc-bin ...
ldconfig deferred processing now taking place
iit@iit-desktop:~$ sudo /etc/init.d/mysql start
Rather than invoking init scripts through /etc/init.d, use the service(8)
utility, e.g. service mysql start

Since the script you are attempting to invoke has been converted to an
Upstart job, you may also use the start(8) utility, e.g. start mysql
iit@iit-desktop:~$ sudo /etc/init.d/mysql restart
Rather than invoking init scripts through /etc/init.d, use the service(8)
utility, e.g. service mysql restart

Since the script you are attempting to invoke has been converted to an
Upstart job, you may also use the restart(8) utility, e.g. restart mysql
mysql start/running, process 3226
iit@iit-desktop:~$ mysql -u root -p
Enter password: 
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 44
Server version: 5.1.41-3ubuntu12.6 (Ubuntu)

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql>
__________________________________________________________
 
Old 11-29-2012, 06:56 AM   #7
jeffstric
LQ Newbie
 
Registered: Nov 2012
Posts: 1

Rep: Reputation: Disabled
thanks

THX it really help me
Quote:
Originally Posted by bathory View Post
So mysqld is not running, so it can create the socket.
Install mysql-server and start mysqld by running:
Code:
sudo /etc/init.d/mysql start
and see if the socket is created
 
  


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] Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' Burningmace Linux - Server 5 09-06-2012 01:29 AM
mysqld - /var/log/mysql/mysql-bin.index not found robin.w Linux - Software 5 02-10-2011 01:00 AM
mysql needs mysqld.sock? radiodee1 Linux - Server 10 01-25-2007 05:33 AM
Mysql Installation on Gentoo - mysqld.sock? Bob Gaskin Linux - Software 1 12-04-2003 11:27 PM
MYSQL on Slackware9.0 ./mysqld: Can't change dir to '/var/lib/mysql/' (Errcode: 13) Litn Linux - Software 2 09-02-2003 09:00 PM


All times are GMT -5. The time now is 07:28 AM.

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