大家好!请教一下报这个错怎么修正:
Warning: mysqli_connect(): (HY000/1130): Host '192.168.1.12' is not allowed to connect to this MySQL server in /home/solothink/Documents/file/work/www/connect_mysql.php on line 5
连接错误: Host '192.168.1.12' is not allowed to connect to this MySQL server
我已经能从phpmyadmin上倒入数据表,在里面操作数据库了。但是通过php不允许连接数据库。这个怎么处理?connect_mysql.php代码在下面:
<!--连接数据库:connect_mysql.php--------->
<?
//连接到数据库服务器
//$con = mysqli_connect ("192.168.1.12", "test_com", "1006","test_com");
$con = mysqli_connect ("192.168.1.12", "test_com", "1006","test_com");
if (!$con)
{
die("连接错误: " . mysqli_connect_error());
}
mysqli_query($con,'SET NAMES UTF8');
?>
|
|