If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > can't connect to local MySQL server through socket

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 02-20-04, 05:54
psychomachine psychomachine is offline
Registered User
 
Join Date: Feb 2004
Posts: 6
can't connect to local MySQL server through socket

I am having problems with recently installed mysql on Mac OS X.

I keep getting the following error message:

ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (61)

any advice on how to proceed?

psychomachine
Reply With Quote
  #2 (permalink)  
Old 02-20-04, 07:27
ika ika is offline
Registered User
 
Join Date: Oct 2003
Location: Slovakia
Posts: 482
Re: can't connect to local MySQL server through socket

Quote:
Originally posted by psychomachine
I am having problems with recently installed mysql on Mac OS X.

I keep getting the following error message:

ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (61)

any advice on how to proceed?

psychomachine
Is your mysqld up and running?
Reply With Quote
  #3 (permalink)  
Old 02-20-04, 08:03
psychomachine psychomachine is offline
Registered User
 
Join Date: Feb 2004
Posts: 6
i am not sure i know how to check that.

but if that means invoking safe_mysqld &

then i get this:

touch: /usr/local/mysql/data/G5.local.err: Permission denied
chown: /usr/local/mysql/data/G5.local.err: Permission denied
Starting mysqld daemon with databases from /usr/local/mysql/data
/usr/local/mysql/bin/safe_mysqld: line 300: /usr/local/mysql/data/G5.local.err: Permission denied
rm: /tmp/mysql.sock: Operation not permitted
rm: /usr/local/mysql/data/G5.local.pid: Permission denied
/usr/local/mysql/bin/safe_mysqld: line 306: /usr/local/mysql/data/G5.local.err: Permission denied
tee: /usr/local/mysql/data/G5.local.err: Permission denied
040220 14:00:38 mysqld ended
tee: /usr/local/mysql/data/G5.local.err: Permission denied

as you can tell, i'm a beginner! many thanks for being willing to help me out.

all best
p.
Reply With Quote
  #4 (permalink)  
Old 02-20-04, 09:00
ika ika is offline
Registered User
 
Join Date: Oct 2003
Location: Slovakia
Posts: 482
Quote:
Originally posted by psychomachine
i am not sure i know how to check that.

but if that means invoking safe_mysqld &

then i get this:

touch: /usr/local/mysql/data/G5.local.err: Permission denied
chown: /usr/local/mysql/data/G5.local.err: Permission denied
Starting mysqld daemon with databases from /usr/local/mysql/data
/usr/local/mysql/bin/safe_mysqld: line 300: /usr/local/mysql/data/G5.local.err: Permission denied
rm: /tmp/mysql.sock: Operation not permitted
rm: /usr/local/mysql/data/G5.local.pid: Permission denied
/usr/local/mysql/bin/safe_mysqld: line 306: /usr/local/mysql/data/G5.local.err: Permission denied
tee: /usr/local/mysql/data/G5.local.err: Permission denied
040220 14:00:38 mysqld ended
tee: /usr/local/mysql/data/G5.local.err: Permission denied

as you can tell, i'm a beginner! many thanks for being willing to help me out.

all best
p.

OK, be sure if mysql was installed according the INSTALL file.
Probably you have problems with permissions.
If you want check if mysqld is running execute following command in shell "ps -aef | grep mysqld" - it will return the running process
or "netstat -an" - it will return all ports which are listening, so check for the port 3306 if is listening
Reply With Quote
  #5 (permalink)  
Old 02-20-04, 09:20
psychomachine psychomachine is offline
Registered User
 
Join Date: Feb 2004
Posts: 6
thanks, ika. but i think i am getting even more confused. yes, mysql is installed. you said "ps -aef" but for that i get "ps: illegal option -- f"

"ps -ae | grep mysqld" on the other hand returns:

1393 std- S 0:00.01 sudo /usr/local/mysql/bin/safe_mysqld --user=mysql
1577 std R+ 0:00.00 grep mysqld SECURITYSESSIONID=2113f0 HOME=/Volumes/Users/psychomachine SHELL=/bin/tcsh U

is that what you had in mind?

i'm useless.
Reply With Quote
  #6 (permalink)  
Old 02-20-04, 12:04
ika ika is offline
Registered User
 
Join Date: Oct 2003
Location: Slovakia
Posts: 482
Quote:
Originally posted by psychomachine
thanks, ika. but i think i am getting even more confused. yes, mysql is installed. you said "ps -aef" but for that i get "ps: illegal option -- f"

"ps -ae | grep mysqld" on the other hand returns:

1393 std- S 0:00.01 sudo /usr/local/mysql/bin/safe_mysqld --user=mysql
1577 std R+ 0:00.00 grep mysqld SECURITYSESSIONID=2113f0 HOME=/Volumes/Users/psychomachine SHELL=/bin/tcsh U

is that what you had in mind?

i'm useless.
Ok do you have a "mysql" user created on your system?
If not just create it. And set permisions for mysql files and directories according to manual or INSTALL file.
Btw. Are you using firewall on your machine?
Reply With Quote
  #7 (permalink)  
Old 02-20-04, 16:08
psychomachine psychomachine is offline
Registered User
 
Join Date: Feb 2004
Posts: 6
yes, i have the user mysql, no firewall... have been following the instructions very closely, and yes, it does seem to be a question of permissions... i think the trouble lies with the mysql/data directory -- i cannot do anything with it. is this what it should be?

drwxr-x--- 8 mysql wheel 272 20 Feb 21:30 data

installation instructions request that I perform the following changes of owners and groups in /usr/local/mysql

1.
chown -R root .
chown: ./data: Permission denied
chown: ./data: Operation not permitted

2.
chown -R mysql data
chown: data: Permission denied

3.
chgrp -R mysql .
chown: ./data: Permission denied

but i cannot achieve that.
sorry to be such a pain.
Reply With Quote
  #8 (permalink)  
Old 02-21-04, 08:31
ika ika is offline
Registered User
 
Join Date: Oct 2003
Location: Slovakia
Posts: 482
Quote:
Originally posted by psychomachine
yes, i have the user mysql, no firewall... have been following the instructions very closely, and yes, it does seem to be a question of permissions... i think the trouble lies with the mysql/data directory -- i cannot do anything with it. is this what it should be?

drwxr-x--- 8 mysql wheel 272 20 Feb 21:30 data

installation instructions request that I perform the following changes of owners and groups in /usr/local/mysql

1.
chown -R root .
chown: ./data: Permission denied
chown: ./data: Operation not permitted

2.
chown -R mysql data
chown: data: Permission denied

3.
chgrp -R mysql .
chown: ./data: Permission denied

but i cannot achieve that.
sorry to be such a pain.
For chown and chgrp commands you need to be logged as root.
Go to the shell end execute "su -" then enter password for root.
You will be logged as root so you could change ownership of directories and files.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
Trackbacks are On
Pingbacks are On
Refbacks are On