Reputation: 2521
I am working on client/server side in android. And create a php file which contains only these lines of code:
mysql_connect("192.184.10.45"); //line#3
mysql_select_db("Test_Data");
$sql=mysql_query("select * from registeration ");
mysql_close();
When I run this on browser then this give me these messages:
Warning: mysql_connect() [function.mysql-connect]: Host ' ' is not allowed to connect to this MySQL server in C:\xampp\htdocs\Project1\server.php on line 3
Upvotes: 2
Views: 10006
Reputation: 30488
pass username and password also here
mysql_connect("192.184.10.45","username","password"); //line#3
And stop using mysql_*
functions they are deprecating, use instead Mysqli
OR PDO
.
Upvotes: 2