Professional Web Applications Themes

problem with mysql.sock - MySQL

Hi, I installed mysql 5.0 on redhat 9.0 from source (tar). The whole procedure occured properly, i could do ./mysqld_safe. But when i want to start the client: mysql, i get :error 2002: cannot connect to mysql server through 'tmp/mysql.sock'. I set /tmp with the sticky bit, because otherwise file 'mysql.sock' woukd be deleted !?. I also created 'my.cnp into /etc, but my problem is that there is no file 'mysql.sock'. I recompiled it again (make, make install) but still no file 'mysql.sock' anywhere. How can i create or get such a file? Thanks ben...

  1. #1

    Default problem with mysql.sock

    Hi,

    I installed mysql 5.0 on redhat 9.0 from source (tar).
    The whole procedure occured properly, i could do ./mysqld_safe.
    But when i want to start the client: mysql, i get :error 2002: cannot
    connect to mysql server through 'tmp/mysql.sock'.

    I set /tmp with the sticky bit, because otherwise file 'mysql.sock' woukd be
    deleted !?.
    I also created 'my.cnp into /etc, but my problem is that there is no file
    'mysql.sock'.

    I recompiled it again (make, make install) but still no file 'mysql.sock'
    anywhere.

    How can i create or get such a file?
    Thanks
    ben



    Ben Guest

  2. #2

    Default Re: problem with mysql.sock

    "Ben" <qsvqsqsdcsqd> wrote in message
    news:o92dnSOBe_LXbDLeRVnyvwscarlet.biz...
    > I installed mysql 5.0 on redhat 9.0 from source (tar).
    > The whole procedure occured properly, i could do ./mysqld_safe.
    > But when i want to start the client: mysql, i get :error 2002: cannot
    > connect to mysql server through 'tmp/mysql.sock'.
    Do you mean '/tmp/mysql.sock'? It probably won't work if it's a relative
    path.
    > I also created 'my.cnp into /etc
    Do you mean 'my.cnf'?
    > I recompiled it again (make, make install) but still no file 'mysql.sock'
    > anywhere.
    Can you confirm that mysqld is running? That is, can you observe the mysqld
    process in a 'ps' listing? I have frequently found it troublesome to get
    mysqld to start up on Linux. Sometimes when I run mysqld_safe on Linux it
    returns to a prompt silently, but fails to start the daemon and logs an
    error message. Be sure to check the error file <hostname>.err, which is
    typically created under the MySQL data directory.

    See [url]http://dev.mysql.com/doc/refman/5.0/en/can-not-connect-to-server.html[/url]
    for more troubleshooting tips.

    Another possibility is that the mysql client you are running from the shell
    is left over from a previous version of MySQL installed on your system, and
    it thinks the socket file is in /tmp/mysql.sock, while the MySQL 5.0 daemon
    you just compiled and started (assuming it did start) thinks the socket file
    is somewhere different. Sometimes it's configured to be created under
    MySQL's data directory. Sometimes under /var somewhere. This should have
    been set at configure time before you compiled. See
    [url]http://dev.mysql.com/doc/refman/5.0/en/configure-options.html[/url].

    Also read
    [url]http://dev.mysql.com/doc/refman/5.0/en/problems-with-mysql-sock.html[/url]

    Regards,
    Bill K.



    Bill Karwin Guest

  3. #3

    Default Re: problem with mysql.sock

    Thanks.
    You're right: the deamon is not running.
    I'll read the stuff and try again.

    My conclusion is: why is it so difficult to install Mysql on a linux box
    when it's so easy on a ... windows box?


    "Bill Karwin" <billkarwin.com> schreef in bericht
    news:dopftp1rqcenews3.newsguy.com...
    > "Ben" <qsvqsqsdcsqd> wrote in message
    > news:o92dnSOBe_LXbDLeRVnyvwscarlet.biz...
    >> I installed mysql 5.0 on redhat 9.0 from source (tar).
    >> The whole procedure occured properly, i could do ./mysqld_safe.
    >> But when i want to start the client: mysql, i get :error 2002: cannot
    >> connect to mysql server through 'tmp/mysql.sock'.
    >
    > Do you mean '/tmp/mysql.sock'? It probably won't work if it's a relative
    > path.
    >
    >> I also created 'my.cnp into /etc
    >
    > Do you mean 'my.cnf'?
    >
    >> I recompiled it again (make, make install) but still no file 'mysql.sock'
    >> anywhere.
    >
    > Can you confirm that mysqld is running? That is, can you observe the
    > mysqld
    > process in a 'ps' listing? I have frequently found it troublesome to get
    > mysqld to start up on Linux. Sometimes when I run mysqld_safe on Linux it
    > returns to a prompt silently, but fails to start the daemon and logs an
    > error message. Be sure to check the error file <hostname>.err, which is
    > typically created under the MySQL data directory.
    >
    > See [url]http://dev.mysql.com/doc/refman/5.0/en/can-not-connect-to-server.html[/url]
    > for more troubleshooting tips.
    >
    > Another possibility is that the mysql client you are running from the
    > shell
    > is left over from a previous version of MySQL installed on your system,
    > and
    > it thinks the socket file is in /tmp/mysql.sock, while the MySQL 5.0
    > daemon
    > you just compiled and started (assuming it did start) thinks the socket
    > file
    > is somewhere different. Sometimes it's configured to be created under
    > MySQL's data directory. Sometimes under /var somewhere. This should have
    > been set at configure time before you compiled. See
    > [url]http://dev.mysql.com/doc/refman/5.0/en/configure-options.html[/url].
    >
    > Also read
    > [url]http://dev.mysql.com/doc/refman/5.0/en/problems-with-mysql-sock.html[/url]
    >
    > Regards,
    > Bill K.
    >
    >
    >

    Ben Guest

  4. #4

    Default Re: problem with mysql.sock

    Ben wrote:
    > Hi,
    >
    > I installed mysql 5.0 on redhat 9.0 from source (tar).
    > The whole procedure occured properly, i could do ./mysqld_safe.
    > But when i want to start the client: mysql, i get :error 2002: cannot
    > connect to mysql server through 'tmp/mysql.sock'.
    >
    > I set /tmp with the sticky bit, because otherwise file 'mysql.sock' woukd be
    > deleted !?.
    > I also created 'my.cnp into /etc, but my problem is that there is no file
    > 'mysql.sock'.
    >
    > I recompiled it again (make, make install) but still no file 'mysql.sock'
    > anywhere.
    >
    > How can i create or get such a file?
    > Thanks
    > ben
    >
    >
    >
    I am not sure, but would setting the sticky bit not prevent mysqld from
    creating a new socket every time it is started ? I don't see the reason
    for the stick bit here. And I noticed you talk about /tmp and the error
    speaks of tmp. Could that be tmp relative to the mysql path perhaps ???

    Rgds
    Sh
    Schraalhans Keukenmeester Guest

Similar Threads

  1. Where should I put the mysql.sock ?
    By howachen@gmail.com in forum MySQL
    Replies: 2
    Last Post: August 18th, 04:30 PM
  2. Replies: 0
    Last Post: January 29th, 02:03 PM
  3. Replies: 1
    Last Post: January 27th, 02:49 AM
  4. Replies: 0
    Last Post: January 24th, 10:55 PM
  5. [PHP] mysql.sock file location
    By Donald Tyler in forum PHP Development
    Replies: 16
    Last Post: September 25th, 08:56 PM

Bookmarks

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139