Heroku MySQL自动递增 [英] Heroku MySQL Auto Increment
问题描述
我使用ClearDB作为mysql数据库。我有一个自动增加主键的表。问题是,它不是递增1,而是递增10。我该如何解决这个问题?
另外,当我在本地主机上测试数据库时,增量工作正常。
编辑:我也尝试使用命令:'SET @@ auto_increment_increment = 1',但它没有奏效。我不确定我是否做得对。
http://www.cleardb.com/developers/help/faq#general_16
自动递增键是在实例之间进行分区以防止碰撞。
I am using ClearDB for a mysql database. I have a table with an auto incremented primary key. The problem is that rather than it incrementing by 1, its incrementing by 10. How can I fix this please?
Also when I tested the db on local host, the incrementation was working correctly.
EDIT: I also tried to use the command: 'SET @@auto_increment_increment=1', but it didnt work. Im not sure if I am doing it right.
http://www.cleardb.com/developers/help/faq#general_16
auto-increment keys are partitioned between instances to prevent collision.
这篇关于Heroku MySQL自动递增的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!