I am wasting a bunch of time trying to connect to an external mysql db from a heroku environment.
I did the following task previously to deploy:
1. Where the mysql DB is located, i did Enable the remote mysql connections from %.herokuapp.com
2. Did add the DB: heroku config:add DATABASE_URL=mysql://user:pass@server:port/database_name
3. Add the the temporal url to the environments.php file and properly setup the db config string:
$db_url = parse_url(getenv("DATABASE_URL"));
$db_server = $db_url["host"];
$db_username = $db_url["user"];
$db_password = $db_url["pass"];
$db_db = substr($db_url["path"],1);
Any suggestions? Thanks!