Welcome Guest, Not a member yet? Register   Sign In
How to connect remote database from localhost?
#1

[eluser]Jack Taylor[/eluser]
Hi,

I want to access remote database from my local CI application.

I am using following database configuration with CI.

$active_group = "default";
$active_record = TRUE;

$db['default']['hostname'] = "www.domainname.com";
$db['default']['username'] = ""; //My online database Username
$db['default']['password'] = ""; //My online database password
$db['default']['database'] = "Database Name"; //db_dev_mpatra
$db['default']['dbdriver'] = "mysql";
$db['default']['dbprefix'] = "";
$db['default']['pconnect'] = FALSE;
$db['default']['db_debug'] = TRUE;
$db['default']['cache_on'] = FALSE;
$db['default']['cachedir'] = "";
$db['default']['char_set'] = "utf8";
$db['default']['dbcollat'] = "utf8_general_ci";

Thanks
Jack
#2

[eluser]Boris Strahija[/eluser]
You have to allow remote access on your database server for your IP or else this will not work.




Theme © iAndrew 2016 - Forum software by © MyBB