1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2000
    Rep Power
    Whenever I try to access the MySQL database with my cgi script it tells me that there was an internal server error. Then in the error log it records this message:

    DBI->connect failed: Can't connect to local MySQL server through socket
    '/tmp/mysql.sock' (2) at survey.cgi line 6

    In my script the conect portion looks like so:


    use CGI;
    use DBI;

    my $dbh = DBI->connect ('DBI:mysql:****');

    What do I need to do so that it connects. Am i not putting the right
    database name? When I asked the the support group on the server they said that:

    "Our servers do not open sockets for particular reasons due to people
    spamming with our servers. I am unsure if the dbi module is set up on our
    servers for this particular use."

    What does spamming have to do with it, I don't spam. And if I can't use the DBI module how else can I connect?

  2. #2
  3. Full Access
    Devshed Regular (2000 - 2499 posts)

    Join Date
    Jun 2000
    London, UK
    Rep Power
    You could try not using Perl and using PHP instead, which doesn't need any modules to connect to MySQL. It's faster and easier to use as well.


Similar Threads

  1. Connecting to MySql with ASP. Help PLEASE
    By john813 in forum ASP Programming
    Replies: 0
    Last Post: February 6th, 2004, 06:34 PM
  2. Segmentation fault connecting to mysql database
    By xixi2244 in forum Perl Programming
    Replies: 5
    Last Post: January 28th, 2004, 11:08 PM
  3. Connecting to mysql database
    By Bushd Moalosi in forum Visual Basic Programming
    Replies: 1
    Last Post: January 22nd, 2004, 07:59 AM
  4. Error connecting to MySQL
    By AZNewsh in forum PHP Development
    Replies: 1
    Last Post: January 5th, 2004, 12:32 PM
  5. Connecting to mysql with just html code?
    By myrkrul in forum Beginner Programming
    Replies: 2
    Last Post: January 2nd, 2004, 07:05 PM

IMN logo majestic logo threadwatch logo seochat tools logo