MySQL Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 



Go Back   Dev Articles Community ForumsDatabasesMySQL Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old August 11th, 2003, 02:50 AM
collins23 collins23 is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Location: kampala uganda
Posts: 19 collins23 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.

i have mysql installed on suse 8.2 but when i try to run mysql i get
ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111)

i did "ps -a|grep mysql"
and noticed the mysql daemon was not running.
i tried starting it with safe_mysqld but i get
mysqld ended.It does not start.
what am i doing wrong
i have installed
mysql 3.23.55-20
mysql-client 3.23.55-20
mysql-shared
need i install the mysql-bench too?

Reply With Quote
  #2  
Old August 12th, 2003, 01:50 AM
collins23 collins23 is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Location: kampala uganda
Posts: 19 collins23 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
i got the solution to my problem all i did was
chown -R mysql /var/lib/mysql/*
chgrp daemon /var/lib/mysql/*
and all worked fine

Reply With Quote
  #3  
Old February 14th, 2004, 11:31 PM
kallol kallol is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Feb 2004
Posts: 1 kallol User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Thumbs up Thanks

Thanks! Its now working. But can u explain me why its working now. Why I can't use mysql user as a mysql group.

Thanks,
Kallol
HRC Techonologies Limited


Quote:
Originally Posted by collins23
i got the solution to my problem all i did was
chown -R mysql /var/lib/mysql/*
chgrp daemon /var/lib/mysql/*
and all worked fine

Reply With Quote
  #4  
Old July 24th, 2004, 08:50 AM
roseL roseL is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jul 2004
Posts: 3 roseL User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Soultion not working for me Error 2002

Quote:
Originally Posted by kallol
Thanks! Its now working. But can u explain me why its working now. Why I can't use mysql user as a mysql group.

Thanks,
Kallol
HRC Techonologies Limited



Hi I am having the same problem and when I tried your fix I bot the reply:
g4:~ rosemarielanaro$ chown -R mysql /var/lib/mysql/
chown: /var/lib/mysql/: No such file or directory
g4:~ rosemarielanaro$ chgrp daemon /var/lib/mysql/
chgrp: /var/lib/mysql/: No such file or directory

I have no clue either I am really new at this and need to get mysql up and running quickly to learn how to develop databases any help would be greatly appreciated.
Thanks
Rose

Reply With Quote
  #5  
Old August 10th, 2004, 04:40 PM
klada klada is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Aug 2004
Posts: 1 klada User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Hi!
It looks like that you have forgotten the "asterix" *.
you should try it exactly as collins23 suggested:
chown -R mysql /var/lib/mysql/*
chgrp daemon /var/lib/mysql/*
Hope that was your problem
kd

Quote:
Originally Posted by roseL
Hi I am having the same problem and when I tried your fix I bot the reply:
g4:~ rosemarielanaro$ chown -R mysql /var/lib/mysql/
chown: /var/lib/mysql/: No such file or directory
g4:~ rosemarielanaro$ chgrp daemon /var/lib/mysql/
chgrp: /var/lib/mysql/: No such file or directory

I have no clue either I am really new at this and need to get mysql up and running quickly to learn how to develop databases any help would be greatly appreciated.
Thanks
Rose

Reply With Quote
  #6  
Old September 23rd, 2004, 09:07 AM
jumbled_text jumbled_text is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Sep 2004
Posts: 1 jumbled_text User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
pls help, I have no clues

I have this problem

Code:
 
Error Number: 2002 Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)


Now, I have read the above posts and I used phpMyAdmin to enter

chown -R mysql /var/lib/mysql/*
chgrp daemon /var/lib/mysql/*

Am i doing this in the wrong place because I get this error:

Code:
#1064 - You have an error in your SQL syntax.  Check the manual that corresponds to your MySQL server version for the right syntax to use near 'chown - R mysql / var / lib / mysql/*
chgrp daemon /var/lib/mys 

Reply With Quote
  #7  
Old November 1st, 2004, 10:25 AM
jayjay23 jayjay23 is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Nov 2004
Location: bristol
Posts: 1 jayjay23 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via MSN to jayjay23
Unhappy Error Number: 2002 Can't connect to local MySQL server through socket '/var/lib/mysql

i have this same problem - the command does not work as the error invalid user is returned? Any1 got any ideas im running mysql on linux suse -pardon my ignorance (im new 2this) but this should bear no relevance surely?

Reply With Quote
  #8  
Old December 12th, 2004, 06:41 AM
Angela Angela is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Dec 2004
Location: Netherlands
Posts: 11 Angela User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Exclamation

Quote:
Originally Posted by jumbled_text
pls help, I have no clues

I have this problem

Code:
 
Error Number: 2002 Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
 


Now, I have read the above posts and I used phpMyAdmin to enter

chown -R mysql /var/lib/mysql/*
chgrp daemon /var/lib/mysql/*

Am i doing this in the wrong place because I get this error:

Code:
#1064 - You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'chown - R mysql / var / lib / mysql/*
chgrp daemon /var/lib/mys 
Ok you guys, since no one seems to be answering this one:
For all of you that get a similar message like:
Quote:
1064 - You have an error in your SQL syntax. Check the manual that .....
Try to do the CHOWN and CHGRP from your prompt (that is linux promt) NOT the mysql promt. Or in this case: open up a client to your linux machine, not use PHPMyAdmin to run this script. This is a script that works on the Operating System level, not in your MySQL environment.
So, even before you open a client (for instance PHPMyAdmin), try the chown/chgrp

But on the other hand: If you DO get a
Quote:
1064 - You have an error in your SQL syntax. Check the manual that .....
it tells me that your deamon has started, and you just opened a mysql client.
So there should not be a problem. If there (still) is: please post the exact message and when you got the message, i.e. what you did just before you got the message.

Reply With Quote
  #9  
Old December 19th, 2004, 06:09 AM
redhatsdad redhatsdad is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Dec 2004
Posts: 1 redhatsdad User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Thumbs up Try this

Had this problem a few time, solved it but did not know how. Forced the problem again last night and this is how it worked for me.
Reloaded Mysql 4.0, then as root did a search for mysql*. Went into "properties" of every thing it found and changed the owner to my username and the group to "users". That solves any access permission problems. I then open usr/sbin/ as user (now owner) and ran ./mysqld in the terminal..... and it worked.
Last, I went into Mysqlcc as user and checked that I had global permissions.
Let me know if this helps. It may be not the "professional" way to solve the problem, and may be its opens up other security difficulties. But as I'm only playing with Mysql at the moment I don't mind.
Have fun

Reply With Quote
  #10  
Old December 21st, 2004, 10:07 AM
MadCowDzz's Avatar
MadCowDzz MadCowDzz is offline
I'm Internet Famous
Dev Articles Frequenter (2500 - 2999 posts)
 
Join Date: Jan 2003
Location: Toronto, Canada
Posts: 2,886 MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level)MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level)MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level) 
Time spent in forums: 1 Week 16 h 19 m 35 sec
Reputation Power: 14
You made yourself the owner?
Do you mean Root, or your userid?

It might be better to make a new account, named mysql, and have them as the user. This could make it less confusing for other users.

Then again, if you're the only user of your box, and simply use it as a testing box, I guess any solution would do =)

I've found in the past, this problem was due to a faulty installation. Generally, the person forgot to run the install script as root...

Reply With Quote
  #11  
Old January 26th, 2005, 08:14 AM
Rova Rova is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jan 2005
Location: Sofia Bulgaria
Posts: 1 Rova User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 22 m
Reputation Power: 0
Quote:
Originally Posted by MadCowDzz
...
I've found in the past, this problem was due to a faulty installation. Generally, the person forgot to run the install script as root...


This problem (error2002) came to me after PowerSupply shock (no UPS available). Afer restart MYSQL was gone.I am novice in Linux but your solutions were very usefull !

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsDatabasesMySQL Development > ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.


Developer Shed Advertisers and Affiliates


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.

© 2003-2014 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap