enter image description hereI tried to add some data to my Database which is on the server and I get this error
Warning: mysqli::__construct(): (HY000/1130): Host ‘ххх .ххх.ххх ‘ is
not allowed to connect to this MariaDB server in./…/..
The user was created through Cpanel and was granted all permissions.
Example code below:
Warning: mysqli::__construct(): (HY000/1130): Host 'ххх .ххх.ххх' is not allowed to connect to this MariaDB server in
<?php
$servername = "xxx.xxx.xxx";
$username = "theveis1_nand1";
$password = "xxxxxxxxx";
$dbname = "theveis1_userdata";
$conn = new mysqli($servername,$username, $password, $dbname);
if($conn->connect_error){
die("Error connect DB".$conn->connect_error);
}
?>
<?php
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
if($_SERVER["REQUEST_METHOD"]== "POST"){
include "$_SERVER[DOCUMENT_ROOT]/assets/coments/connectDB.php";
if ($conn === null) {
die("Error connect DB");
}
I’m a beginner, so I can’t understand why this error (
Please help, explain the error and also help to fix it)
THANK YOU VERY MUCH in advance
4