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

    Join Date
    Sep 2000
    Posts
    1
    Rep Power
    0
    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:


    #!/usr/local/bin/perl

    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?

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

    Join Date
    Jun 2000
    Location
    London, UK
    Posts
    2,019
    Rep Power
    17
    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.

    --------------------------------------------
    Alex
    (http://www.alex-greg.co.uk)

Similar Threads

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

IMN logo majestic logo threadwatch logo seochat tools logo