Answer by Mitchell McKenna for CodeIgniter configure different IP for READ and WRITE MySQL data
September 3 2010, 4:47am
Setup multiple 'connection groups' for each server in your database.php config file, then in the Model:
$DB1 = $this->load->database('group_one', TRUE); $DB2 = $this->load->database('group_two', TRUE);
//read from DB1 $DB1->query();
//write to DB2 $DB2->insert();
See examples in: Connecting to Multiple Databases