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 '126.96.36.199' 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 "188.8.131.52" $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
phpMyAdminpage as other suggest
Don't I have any permission to connect programmatically to this host as I am just a free user?
I'm also thinking of uploading the whole
XAMPPin the server so I could do the things I'm imagining.
Also one more thing, I imported the database by means of
.sqlfile locally through that server, maybe this has something to do about it?