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

时间:2022-09-22 16:03:52
$connect = mysql_connect("185.13.226.228", "xxxxx", "xxxxx") or die("Server is having problems at the moment. Please contact xxxx or xxx.");

That is my piece of code. It doesn't seem to connect to the IP. But I can connect to it manually. I hope you can help me out here.

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

Thank you.

1 个解决方案

#1


0  

Try with: localhost

尝试使用:localhost

Also i would highly recommend you to use and learn PDO.

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

Here is a good start:

这是一个好的开始:

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

#1


0  

Try with: localhost

尝试使用:localhost

Also i would highly recommend you to use and learn PDO.

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

Here is a good start:

这是一个好的开始:

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