Find the answer to your Linux question:
Results 1 to 7 of 7
Heres what I get: bash-3.00$ mysql ERROR 2002: Can't connect to local MySQL server through socket '/var/run/mysql/mysql.sock' (2) Any ideas?!?! Thanks, Evan P.S. Im a newbie to the whole server ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Mar 2005
    Posts
    9

    Slackware 10.1 & mysql problem!!!!!


    Heres what I get:

    bash-3.00$ mysql
    ERROR 2002: Can't connect to local MySQL server through socket '/var/run/mysql/mysql.sock' (2)

    Any ideas?!?!

    Thanks,
    Evan

    P.S. Im a newbie to the whole server thing... sorry.

  2. #2
    Linux Newbie
    Join Date
    Dec 2004
    Location
    Barrie, Ontario
    Posts
    219
    Is mysql server started?

    Code:
    ps -A | grep mysql
    Blog - KB5UMQ - Linux User #272983
    3 Rules:
    1) "It doesn't work..." is simply not useful information.
    2) Don't cross post!
    3) If you are asking for help, start by telling us your distro/os and version.

  3. #3
    Linux Newbie deek's Avatar
    Join Date
    Mar 2005
    Location
    Fort Wayne, IN
    Posts
    248
    Yeah, that would be my guess too. I was just messing around with mysql last night, so I was very familiar with that error.

    Make sure you start your server. I was using:

    > mysqld_safe --user='user-name' &

    That started it up and then I would do:

    > mysql -u 'user-name' -p

    To get into it. After you do that you should get the mysql> prompt.

    And just like code said, you can check your processes to see if you see the server running. When I would do a ps, I would see about 8-10 mysql processes.

  4. $spacer_open
    $spacer_close
  5. #4
    Just Joined!
    Join Date
    Mar 2005
    Posts
    9

    heres what I always get:

    bash-3.00# mysql
    ERROR 2002: Can't connect to local MySQL server through socket '/var/r
    ql/mysql.sock' (2)
    bash-3.00#

    bash-3.00# mysqld_safe
    Starting mysqld daemon with databases from /var/lib/mysql
    STOPPING server from pid file /var/lib/mysql/EviX.pid
    050331 14:08:47 mysqld ended

    bash-3.00#
    I even get this message after I boot, before I login...

    Thanks,
    Evan

  6. #5
    Linux Newbie deek's Avatar
    Join Date
    Mar 2005
    Location
    Fort Wayne, IN
    Posts
    248
    Try this:

    bash-3.00# mysqld_safe --user=root &

    This should start the server. Then you can do:

    bash-3.00# ps

    You should see several mysql processes.

    Then you can use the mysql command to login to the server.

  7. #6
    Just Joined!
    Join Date
    Mar 2005
    Posts
    9

    no go...

    bash-3.00# mysqld_safe --user=root &
    [1] 7170
    bash-3.00# Starting mysqld daemon with databases from /var/lib/mysql
    STOPPING server from pid file /var/lib/mysql/EviX.pid
    050331 14:32:59 mysqld ended


    [1]+ Done mysqld_safe --user=root
    bash-3.00# ps
    PID TTY TIME CMD
    7045 pts/1 00:00:00 bash
    7202 pts/1 00:00:00 ps
    bash-3.00#

  8. #7
    Just Joined!
    Join Date
    Apr 2005
    Posts
    40
    I guess I know what your problem is...

    First you have to install database... It's easy:

    su mysql
    mysql_install_db

Posting Permissions

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