The settings in \config\database.php for remote database connectivity are the following:
// Remote Server settings
$db['default']['hostname'] = 'abc.com';
$db['default']['username'] = 'admin';
$db['default']['password'] = 'password';
$db['default']['database'] = 'mydatabase';
But accessing the webpage via browser it gives the following error.
A Database Error Occurred
Unable to connect to your database server using the provided settings.
Is there any issue with hostname? Other credentials are correct but I am not sure about hostname! I provided the IP address of my website also but both give the same error. The hostname of mysql database will be different than the website? although I hosted the database on the same server using CPANEL.