Find the answer to your Linux question:
Results 1 to 2 of 2
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Mar 2006
    San Marcos, TX

    New to MySQL. Need help!

    I am completely new to SQL. Today was my first time ever using it. I was able to add a user and create a password.

    linux:~ # mysql -u myusername -p
    Enter password: -----
    ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)

    what can I do to resolve this error? thank you.

  2. #2
    Just Joined! tom-tjtech's Avatar
    Join Date
    Apr 2006

    Arrow Cant connect to mysql -error 2002

    your mysql server is NOT running...

    at the promp do...

    [linux~]$ su -
    (admin password)

    [root]$ service mysqld restart
    Stopping mysql [FAILED}
    Starting mysql [ OK ]

    [rrot]$ try logging in again.

    If it works now check you bootup

    [root]$ chkconfig --list mysqld
    mysqld   0:off   1:off   2:off 3:on  4:on  5:on  6:off
    if all off use
    [root]$ chkconfig --add mysqld

    Reboot and check again.

Posting Permissions

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