I have already uploaded some files in the free web host I chose and created a database there using phpMyAdmin v2.11.4
Also, I have Googled first this question before posting this here but I don't understand some rules and I need a clarification.
The exact error I get from viewing my uploaded file(index.php) is this:
Warning: mysqli_connect() [function.mysqli-connect]: (HY000/1130): Host '31.170.160.98' is not allowed to connect to this MySQL server in /home/a6400350/public_html/subdomains/index.php on line 7
Domain name of free web host I'm using is www.000webhost.com
And my php code for connecting to host is:
<?php
$host = "sql10.000webhost.com"; //or "31.170.160.98"
$username = "a6400350xxxxxx";
$password = "••••••••";
$con = mysqli_connect($host, $username, $password);
?>
- I also check if the server is down here or it's just me
- There was also no previlege section in
phpMyAdmin
page as other suggest
Don't I have any permission to connect programmatically to this host as I am just a free user?
Edit
I'm also thinking of uploading the whole
XAMPP
in the server so I could do the things I'm imagining.
Edit 2
Also one more thing, I imported the database by means of
.sql
file locally through that server, maybe this has something to do about it?