PHP将无法连接到我的MySQL数据库

时间:2014-11-29 16:56:26

标签: php mysql database

$connect = mysql_connect("185.13.226.228", "xxxxx", "xxxxx") or die("Server is having problems at the moment. Please contact xxxx or xxx.");

这是我的一段代码。它似乎没有连接到IP。但我可以手动连接到它。我希望你能在这里帮助我。

谢谢。

1 个答案:

答案 0 :(得分:0)

尝试使用:localhost

另外,我强烈建议您使用和学习PDO

这是一个好的开始:

http://php.net/manual/en/book.pdo.php