what 's wrong with the following code ?
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>
<body>
<?php
$host = "localhost";
$username = "ZXXics";
$password = "XXXXXX711";
$connection = mysql_connect($host,$username,$password)
or die("connection could not be established");
?>
</body>
</html>
I'm getting this error
Warning: mysql_connect() [function.mysql-connect]: Can't connect to MySQL server on 'localhost' (10061) in D:\Hosting\5246561\html\treats.php on line 14
connection could not be established
Perhaps this will help:
http://dev.mysql.com/doc/refman/5.5/en/can-not-connect-to-server.html
And
- http://php.net/manual/en/function.mysql-connect.php
- http://devzone.zend.com/node/view/id/641
In some cases it seems the user name must be "root".
Powered by Invision Power Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)