mysql_connect()
1 reply [Last post]
does not have a status.
User offline. Last seen 1 year 2 weeks ago. Offline
Joined: 02/20/2010
Points: 20

saya mempunyai satu masalah.. apabila saya buka laman web saya, ini yang akan keluar

Warning: mysql_connect() [function.mysql-connect]: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) in /home/content/56/8403856/html/GAKUNA/conn.php on line 27
Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)

fail conn.php seperti ini..

<?

//enter your MySQL database host name, often it is not necessary to edit this line
$db_host = "localhost";

//enter your MySQL database username
$db_username = "gabstore";

//enter your MySQL database password
$db_password = "12345678";

//enter your MySQL database name
$db_name = "gb";

//Script URL
$site_url = "http://www.gakuna.com/";

//conect to db
$conn = mysql_connect($db_host, $db_username, $db_password) or die(mysql_error());
$db = mysql_select_db($db_name, $conn) or die(mysql_error());

//start session
session_start();

//get the time
$t = time();

?>

ada sesiapa yang boleh bantu sya menyelesaikan masalah ini?

rasenye dah jumpe keje yg best ^_^
sword_ffx's picture
User offline. Last seen 11 weeks 5 days ago. Offline
Joined: 06/23/2011
Points: 176

based on feedback through google.

kena tukar permission utk folder tu. try tukar pakai putty ke.

solution pertama

solution kedua