• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
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.


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.