I've been playing around with this code in-order to have ability to connect from an outside network :
The Code Below works perfect IF only i'm withing the same network :
<?php
define ('DB_USER', 'test_user');
define ('DB_PASSWORD', 'test_password');
define ('DB_HOST', '192.168.x.xxx:3306');
define ('DB_NAME', 'testing');
$dbc=mysql_connect(DB_HOST, DB_USER, DB_PASSWORD)
OR die ('Could not connect to MySQL: '.mysql_error()); @mysql_select_db (DB_NAME)
OR die ('Could not select the database" '.mysql_error());;
?>
Now I have the IP address found in router settings 79.xxx.xxx.xx, but when i try to replace the 192.168.x.xxx ip, it shows the following error :
Could not connect to MySQL: No connection could be made because the target machine actively refused it.
Please Note I already have edited phpmyadmin conf file and replaced the following :
<Directory "c:/wamp/apps/phpmyadmin3.5.1/">
Options Indexes FollowSymLinks MultiViews
AllowOverride all
Order Allow,Deny
Allow from all
</Directory>
What should i do to make it work ? Please Help Thanks