Auto increment by 1 in MySQL using clearDB

I am using Windows Azure with clearDB. The current database auto-increment value is 10. I want it to be like 1.

I tried to run these commands in PHPMyAdmin using

1)

set global auto_increment_increment = 1; set global auto_increment_offset = 1; 

ERROR: # 1227 - Access denied; you need (at least one of) SUPER privilege for this operation

2)

 set auto_increment_increment = 1; set auto_increment_offset = 1; 

After that I checked it with this command,

 SHOW VARIABLES LIKE 'auto_inc%'; 

RESULT:

 Variable_name Value auto_increment_increment 10 auto_increment_offset 1 

What could be the reason?

+6
source share
1 answer

When I sent the ticket to clearDB, they answered me like this:

ClearDB uses circular replication to provide MySQL master-master support. Thus, some things, such as auto-detection keys (or sequences), must be configured so that one wizard does not use the same key as the other, in any case. We do this by setting up MySQL to skip specific keys, and forcing MySQL to use a specific offset for each key used. The reason we use the value 10 instead of 2 is for future development.

+9
source

Source: https://habr.com/ru/post/975731/


All Articles