invoking mysql error

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • James Griffiths

    #1

    invoking mysql error

    System Info:
    RedHat Linux 9 (text only)
    Mysql 3

    When I execute mysql from the command line I receive an error:

    "error 2002: Mysql cannot connect to socket /var/lib/mysql.sock"

    (or something similar) - the socket was definately not
    "/tmp/mysql.sock"


    It was installed by the RedHat 9 installer. Do I have to edit some
    configuration file.

    Does anyone have any good ideas?

    Thanks.
    James
  • Aggro

    #2
    Re: invoking mysql error

    James Griffiths wrote:
    [color=blue]
    > "error 2002: Mysql cannot connect to socket /var/lib/mysql.sock"[/color]

    Start with this:
    http://dev.mysql.com/doc/mysql/en/Ca...to_server.html

    Comment

    • Bill Karwin

      #3
      Re: invoking mysql error

      James Griffiths wrote:[color=blue]
      > "error 2002: Mysql cannot connect to socket /var/lib/mysql.sock"[/color]

      I get this error when mysqld is not running.
      Did you follow the installation instructions after installing the rpm on
      your Linux machine?

      http://dev.mysql.com/doc/mysql/en/Un...tallation.html

      Regards,
      Bill K.

      Comment

      • Andres Monroy-Hernandez

        #4
        Re: invoking mysql error

        James Griffiths wrote:[color=blue]
        > System Info:
        > RedHat Linux 9 (text only)
        > Mysql 3
        >
        > When I execute mysql from the command line I receive an error:
        >
        > "error 2002: Mysql cannot connect to socket /var/lib/mysql.sock"
        >
        > (or something similar) - the socket was definately not
        > "/tmp/mysql.sock"
        >
        >
        > It was installed by the RedHat 9 installer. Do I have to edit some
        > configuration file.
        >
        > Does anyone have any good ideas?
        >
        > Thanks.
        > James[/color]

        James,

        Check if the socket exists in the location that the error message
        specifies. If it doesn't, either it's somewhere else and you need to
        adjust your /etc/my.cnf or your MYSQL_UNIX_PORT environment variable; or
        your MySQL daemon is not running at all. Try ps -efww | grep mysql to
        see of MySQL is running.

        Regards,

        --
        Andrés Monroy-Hernández

        Comment

        Working...