I had the same problem with my Dreamhost MySQL database. Turns out the solution was to say that Dreamhost was ok to accept connections from this foreign host. Otherwise, Dreamhost blocks all requests to MySQL that do not come from their systems.
It seems that if Heroku returns to Amazon AWS despite your DATABASE_URL, it is because he is denied access to your MySQL database.
Brandon medenwald
source share