I try to connect to multi MySQL database in CI if the connection to the first DB fails, I try to connect to the second, I use this code from CI forum: http://ellislab.