I have uploaded files on yahoo hosting , but when i open its phpmyadmin credentials of mysql work fine but same credentials not work in code . here is super easy code to connect my
<?php
$conn = mysql_connect('localhost', 'username','password');
if (!$conn) {
echo "<p>Could not connect to mysql server </p>\n";
echo mysql_error();
}
mysql_select_db('..CMS-2', $conn);
?>
some time it says 500 - Internal Server Error and some time it says message print in code , i have also used mysql instead of localhost but no benefit
Could not connect to mysql server Can't connect to local MySQL server through socket '/tmp/mysql.sock' (46)
Aucun commentaire:
Enregistrer un commentaire