Assuming that you are trying to connect to the mysql database in pagodabox from your local machine.
1.Secure Database Tunnel from Your Desktop. You might get something like this if the connection is successful.
Tunnel Established! Accepting connections on :
-----------------------------------------------
HOST : 127.0.0.1 (or localhost)
PORT : 3307
USER : (found in pagodabox dashboard)
PASS : (found in pagodabox dashboard)
2.Connecting from local codeigniter application to pagodabox mysql
$this->load->database();
echo 'here';
$db['default']['hostname'] = '127.0.0.1';
$db['default']['username'] = 'xxxx';
$db['default']['password'] = 'xxxx';
$db['default']['database'] = 'blog';
..
..
$db['default']['port'] = 3307; // This one matches with Port displayed above.
</pre>
To see the error, open up index.php file and set error reporting E_ALL
if (defined('ENVIRONMENT'))
{
switch (ENVIRONMENT)
{
case 'development':
error_reporting(E_ALL);
break;
case 'testing':
case 'production':
error_reporting(0);
break;
default:
exit('The application environment is not set correctly.');
}
}
error_reporting(E_ALL);