Remove ?reconnect=true
from the end of DATABASE_URL
The parameters after the database are arguments to the MySQL server. In this case, it asks to reconnect if the connection is dropped. It looks like the MySQLdb package doesn't support that argument.