PHP Connection Error; Not allowed to connect to MySQL Server

↘锁芯ラ 提交于 2019-12-06 05:53:15

If your mysql database is not on the same server(localhost) you need to give it access from a remote server for that mysql user/database for your server. See this article for some steps that might help you. It sounds like it might be remote.

https://support.rackspace.com/how-to/mysql-connect-to-your-database-remotely/

Create new php file, just test with below syntax. let me know your error.

$con=mysqli_connect("Correct Website is here","Correct Username","Correct Pass","Correct DB");
if (mysqli_connect_errno())
{
echo "Failed to connect to MySQL: " . mysqli_connect_error();
}
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!