Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

MySQL socket error 2002

  • 15-04-2016 9:16pm
    #1
    Closed Accounts Posts: 87 ✭✭


    Hi

    I am aware that this is a known error and I've searched everywhere but I cannot solve it.

    I installed MySQL by double clicking the .pkg file on my Mac. When I try mysql -u root -p I get this error:

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

    Any reason why? The mysql.sock file is located in /var/mysql but there's no text in the file. Where should it be? I've spent the whole day trying to fix this but the error still persists.

    In /etc is where my.cnf file is located and in it is this:

    [mysqld]
    datadir=/usr/local/var/mysql
    socket=/var/mysql/mysql.sock

    [mysql.server]
    user=mysql
    basedir=/usr/local/Cellar/mysql/5.6.10

    [client]
    socket=/var/mysql/mysql.sock

    I'm using OSX El Capitan. I just want to set up MySQL so I can use phpMyAdmin as a GUI.

    Any help is appreciated.


Comments

  • Registered Users, Registered Users 2 Posts: 3,500 ✭✭✭Drexel


    Is the MySQL server actually running? Have you started it?


  • Closed Accounts Posts: 87 ✭✭scuderia


    Drexel wrote: »
    Is the MySQL server actually running? Have you started it?

    Yes. When I go to Activity Monitor the process "mysqld" is there.


  • Registered Users, Registered Users 2 Posts: 3,500 ✭✭✭Drexel


    scuderia wrote: »
    Yes. When I go to Activity Monitor the process "mysqld" is there.

    Try restarting it and logging in again. Also you are passing -p but with no password

    Loads of people seeing the same error. Just google it and work through some of the suggestions. One of them will be the correct one


  • Closed Accounts Posts: 87 ✭✭scuderia


    Drexel wrote: »
    Try restarting it and logging in again. Also you are passing -p but with no password

    Loads of people seeing the same error. Just google it and work through some of the suggestions. One of them will be the correct one

    It prompts me for a password and when I enter it I get the error. I've looked everywhere, no idea what to do anymore. Have a post on Stack Overflow as well:

    http://stackoverflow.com/questions/36654411/mysql-cant-connect-to-local-mysql-server-error-2002


  • Registered Users, Registered Users 2 Posts: 3,500 ✭✭✭Drexel


    scuderia wrote: »
    It prompts me for a password and when I enter it I get the error. I've looked everywhere, no idea what to do anymore. Have a post on Stack Overflow as well:

    http://stackoverflow.com/questions/36654411/mysql-cant-connect-to-local-mysql-server-error-2002

    The guys on stack overflow should sort it for you. They are very good.

    One thing, have you set a root password? I think MySQL has no password set by default. Ha e you tried logging in without -p?


  • Advertisement
Advertisement