不允许使用php连接到此MariaDB服务器 [英] not allowed to connect to this MariaDB server in php
本文介绍了不允许使用php连接到此MariaDB服务器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我尝试用php连接我的远程服务器数据库,但出现波纹错误
I try connect my remote server database in php but it's give bellow error
Host 'xx.xxx.xx.xx' is not allowed to connect to this MariaDB server in
我的连接代码是这样的
$servername = "my_server_address";
$username = "my_username";
$password = "my_password";
$dbname = "my_db";
$conn = new mysqli($servername, $username, $password, $dbname);
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
推荐答案
如果您的凭据有效,则很可能需要配置MariaDB进行远程客户端访问.
If your credentials are valid, you most likely need to configure MariaDB for remote client access.
这篇关于不允许使用php连接到此MariaDB服务器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文