Re: Mysql prolem
Posted by:
Luca
(---.i07-31.onvol.net)
Date: November 30, 2012 10:42AM
<?php
$dbhost ="127.0.0.1";
$dbuser="root";
$dbpassword="password" ;
$link = mysql_connect('dbhost','dbuser','dbpassword');
if (!$link) {
die('Could not connect to MySQL: ' . mysql_error());
}
echo 'Connection OK'; mysql_close($link);
?>
now its producing a different error
Could not connect to MySQL: php_network_getaddresses: getaddrinfo failed: No such host is known.
even after changing the host to localhost from 127.0.0.1 , the same error is shown