I set up my environment variable,export DEV_DATA_BASE_URL=mysql://user:password@server/databasename, in my virtualenv console. I am working with Flask, in the virtuaIenv console I run python manager.py shell, and I was able to create the TABLES in my data base using db.create_all(). However, it seem that the value of the DATA_BASE_URL is missing when the app tries to connect to it when in production. I have the following error:
File "/home/masaguaro/.virtualenvs/my-virtualenv/lib/python3.4/site-packages/MySQLdb/connections.py", line 280, in query _mysql.connection.query(self, query) _mysql_exceptions.OperationalError: (2006, 'MySQL server has gone away')
How can I prevent this from happening ?