Jump to content

Warning: mysql_connect(): Can't connect to local MySQL server through socket '/


Recommended Posts

 

Warning: mysql_connect(): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) in /home/www/true-gangsters.mygamesonline.org/includes/db_connect.php on line 6

Can't connect to the MySQL server. Please contact the webmaster.

 

Thats what it comes up with when i go to my site.

 

Heres the code :-

 

<?php

session_start();
ob_start();

$connect = mysql_connect("localhost:330*","122***_trueg","TussR");
if($connect == TRUE) {
if(mysql_select_db("122716_trueg") != TRUE) {
  exit("<span style='color: red'>Can't connect to the MySQL database. Please contact the webmaster.</body></html>");
}
}else{
exit("<span style='color: red'>Can't connect to the MySQL server. Please contact the webmaster.</body></html>");
}
?>

You already posted this question here: http://www.phpfreaks.com/forums/index.php/topic,199885.msg903133.html#msg903133

 

It was moved to the 3rd party forum because it's a 3rd party script.  Please do not make multiple threads asking the same thing.

 

Thread closed.

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.