I have two computers connected on the lan and i want to simulate a client server type of configuration .So suppose i have pc1 acting as the server and pc2 as the client.I created a database on the pc1 and kept the registration form on the pc2 .so whenever i execute the registration script i get the following error.
Failed to connect to MySQL: Host '192.168.2.6' is not allowed to connect to this MySQL server
This is the registration code where i have replaced database host with the ip address of pc1(server) which is running xampp .
<?php
define('DB_HOST', '192.168.2.7');//192.168.2.7 is the ip address of my server.
define('DB_NAME', 'hello');
define('DB_USER','root');
define('DB_PASSWORD','');
$con=mysql_connect(DB_HOST,DB_USER,DB_PASSWORD) or die("Failed to connect to MySQL: " . mysql_error());
$db=mysql_select_db(DB_NAME,$con) or die("Failed to connect to MySQL: " . mysql_error());
Do have i have to make any changes in mysql config file in xampp or if i have to make changes to the database host name.