Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Heroku MySQL Auto Increment

Tags:

mysql

heroku

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.

like image 335
Goaler444 Avatar asked Dec 29 '12 02:12

Goaler444


1 Answers

http://www.cleardb.com/developers/help/faq#general_16

auto-increment keys are partitioned between instances to prevent collision.

like image 196
gary schulte Avatar answered Sep 28 '22 00:09

gary schulte