Cannot connect

  • Profile Image
    Anna Clemann
    Asked on January 31, 2012 at 12:03 AM

    Hi

    When I try to past in the code, the page comes up with this message 'Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)'.

    Is this something I am doing wrong? Any help would be much appreciated - all the rest is very clear.

    Thanks

  • Profile Image
    fxr
    Answered on January 31, 2012 at 05:40 AM

    Is this in reference to this article?

    http://www.jotform.com/help/126-How-to-Insert-or-update-form-submissions-to-your-MySQL-database-using-PHP

    It sounds like your script isnt able to connect to MySql on your webserver.

    Is mysql definately running? 

    Is the php file on the same server as the mysql server?

  • Profile Image
    mhps
    Answered on January 31, 2012 at 08:07 PM

    Thanks fxr - I have tried it again this morning and it worked fine, so I am guessing there was something wrong at my end yesterday. It works perfectly now.

    Thanks.

    Anna