EntropySink

Technical & Scientific => Programming => Topic started by: Steve on October 03, 2008, 08:40:01 PM

Title: MySQL Connection issues
Post by: Steve on October 03, 2008, 08:40:01 PM
Code is below....never seen this error before, quadruple checked the db info against the smf forum on the same db, everything is correct. This is the same db_connect script i always use with the user info modified.

Is it possible the method i am using is no compatible with the host? I never used this script with 1&1 before....

Quote
Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

Code: [Select]
<?php

$hostname 
"db1687.......net";
$database "db26......";
$username "dbo........";
$password_ASA "xxxxxx";
$establish mysql_connect($hostname$username$password) or trigger_error(mysql_error(),E_USER_ERROR); 

if(
$establish==false){
    echo 
"failed to connect to database";
    exit();
}

?>

Title: Re: MySQL Connection issues
Post by: Mike on October 03, 2008, 10:11:24 PM
Sounds like they don't have their mysql stuff setup right.
Title: Re: MySQL Connection issues
Post by: Steve on October 03, 2008, 10:12:43 PM
Shocking.
Title: Re: MySQL Connection issues
Post by: Steve on October 04, 2008, 10:43:17 AM
I'm just going to switch to a new host. A friend of mine is the technical manager for the myspace DC and he's going to hook me up with a dedicated server. Between the internal 500 errors i cant track and this i have to believe these issues are on the host and not me.