When I use django to design a website and delopy, I find I have some trouble if I use MySQL that the Binlog is activate( format:STATEMENT).
There are my settings for this deployment:
- Django based website
- uwsgi
- Ningx
- MySQL
The first step, I need to migrate my models to databese, so I input like this:
python manage.py migrate
And traceback like this:
django.db.utils.OperationalError: (1665, 'Cannot execute statement: impossible
to write to binary log since BINLOG_FORMAT = STATEMENT and at least one table
uses a storage engine limited to row-based logging. InnoDB is limited to row-
logging when transaction isolation level is READ COMMITTED or READ UNCOMMITTED.')
After searching in Internet, I know the one way to fix it is to change the Binlog format, which works perfectly for me.
But I still want to know how to fix it if I don't want to change my Binlog configuration. I think Django can support this format for Binlog.