DATABASE_URL- MYSQL://username:password@host:port/database_name
Error: database_name has no attributes.
if 'DATABASE_URL' in os.environ:
url = urlparse(os.getenv['DATABASE_URL'])
g['db'] = mysql.connector.connect(user=url.username,password=url.password, host=url.hostname ,port=url.port,path=url.path[1:])