Results 1 to 8 of 8
  1. #1
    Join Date
    Feb 2004
    Posts
    6

    Unanswered: 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

  2. #2
    Join Date
    Oct 2003
    Location
    Slovakia
    Posts
    482

    Re: can't connect to local MySQL server through socket

    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?

  3. #3
    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.

  4. #4
    Join Date
    Oct 2003
    Location
    Slovakia
    Posts
    482
    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

  5. #5
    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.

  6. #6
    Join Date
    Oct 2003
    Location
    Slovakia
    Posts
    482
    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?

  7. #7
    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.

  8. #8
    Join Date
    Oct 2003
    Location
    Slovakia
    Posts
    482
    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •