How to connect remote database from localhost? - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: How to connect remote database from localhost? (/showthread.php?tid=21887) |
How to connect remote database from localhost? - El Forum - 08-24-2009 [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 How to connect remote database from localhost? - El Forum - 08-24-2009 [eluser]Boris Strahija[/eluser] You have to allow remote access on your database server for your IP or else this will not work. |