mysql connect failure

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Paul Lautman

    #1

    mysql connect failure

    I have 2 scripts that both start with:
    <?php
    // Database Connection
    include 'connect.php';

    One of them is fine, but the other gives the error:

    Warning: mysql_connect() : Can't connect to local MySQL server through socket
    '/var/lib/mysql/mysql.sock' (111)

    Since the same file is being included both times, I can't see why it should
    fail in one case.

    Any ideas anyone?

    TIA
    Regards
    Paul


  • Tim Roberts

    #2
    Re: mysql connect failure

    "Paul Lautman" <paul.lautman@b tinternet.com> wrote:
    [color=blue]
    >I have 2 scripts that both start with:
    ><?php
    >// Database Connection
    >include 'connect.php';
    >
    >One of them is fine, but the other gives the error:
    >
    >Warning: mysql_connect() : Can't connect to local MySQL server through socket
    >'/var/lib/mysql/mysql.sock' (111)
    >
    >Since the same file is being included both times, I can't see why it should
    >fail in one case.
    >
    >Any ideas anyone?[/color]

    Two different scripts on one machine, or one script on two different
    machines? If it is the latter, then one machine isn't running MySQL
    locally.

    If the former, are these both running as CGI or within Apache?
    --
    - Tim Roberts, timr@probo.com
    Providenza & Boekelheide, Inc.

    Comment

    Working...