当我使用django设计一个网站和delopy时,我发现如果我使用MySQL,Binlog是激活的(格式:语句)。在
此部署有我的设置:
- 基于Django的网站
- 乌兹基
- 宁克斯
- MySQL数据库
第一步,我需要将我的模型迁移到数据库,所以我输入如下:
python manage.py migrate
像这样追溯:
^{pr2}$
在互联网上搜索之后,我知道解决这个问题的一个方法是更改Binlog格式,这对我来说非常合适。在
但如果我不想更改Binlog配置,我还是想知道如何修复它。我认为Django可以支持Binlog的这种格式。在
Tags:
经过昨天的研究,我找到了一个解决这个问题的方法。在
虽然有两种方法可以解决这个问题,但我认为没有最好的解决办法。如果有人有一个更好的答案,不修改
my.cnf
,请告诉我。在我遇到了类似的问题,并通过将隔离级别更改为“可重复读取”来解决它。你真的只需要它来应用迁移,然后你就可以(?)把它取下来。在设置.py我将数据库设置更改为:
然后运行
python manage migrate
,然后删除OPTIONS
项。注意these risks。在是否可以尝试将Binlog格式设置为行
要设置格式,请使用这个
之后使用下面的查询进行确认
^{pr2}$相关问题 更多 >
编程相关推荐