Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End MySQL Mac Error:2002

  • This topic is empty.
Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #157270
    ylex1
    Participant

    Hi guys

    Im having a problem trying to enter MySQL trough Terminal when I type

    /usr/local/zend/mysql/bin/mysql -u root

    it gives me this error

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

    Do you guys know whats going on?

    #157308
    __
    Participant

    I know this is like asking “have you tried turning it off and on?”, but:

    1 ) Do you have mysql-server installed (not mysql-client)?

    2 ) Have you made sure the service is currently running?

    Beyond that:

    Have you been able to use this installation of mysql before? or are you just now setting it up (or upgrading)?

    Have you tried connecting with a password (e.g., mysql -u root -p)?

    #157317
    ylex1
    Participant

    I don’t know man I think it is running

    1) Yes it is

    2) I think it is but I don’t know how to see if it is

    I’m learning from a book called Dynamic Websites from O’Reilly it’s the introduction to MySQL so I haven’t use it

    I’ve tried it it gave me the same error

    #157325
    __
    Participant

    I think it is [running] but I don’t know how to see if it is

    ps -ef | grep mysql
    

    (this is linux, dunno about mac but I’d think it would work just fine.)

    #157330
    ylex1
    Participant

    It return this

    501 721 716 0 5:13PM ttys000 0:00.00 grep mysql

    XS

    #157332
    __
    Participant

    That looks like the mysql client. I would expect to see … mysqld somewhere.

    I’m not sure how to start services on a mac, but give it a try (might vary if your mysql server is installed elsewhere – if you know where you installed it, use that path instead):

    sudo /usr/local/mysql/support-files/mysql.server start
    
    #157615
    ylex1
    Participant

    Didn’t work, I changed the path accordingly and it didn’t work, someone suggested to uninstall zend all together XS

    #157617
    ylex1
    Participant

    from what I understand there should be a mysql.sock file in my /usr/local/zend/mysql/tmp carpet but there’s not

    #157624
    ylex1
    Participant

    SOLVED
    the correct way to start mysql was/usr/local/zend/mysql/bin/mysql.server start

Viewing 9 posts - 1 through 9 (of 9 total)
  • The forum ‘Back End’ is closed to new topics and replies.