php – 使用clearDB在MySQL中自动增加1

前端之家收集整理的这篇文章主要介绍了php – 使用clearDB在MySQL中自动增加1前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我正在使用带有clearDB的 Windows Azure.当前数据库自动增量值为10.我希望它为1.

我试图在PHPMyAdmin中运行这些命令,

1)

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

错误:#1227 – 拒绝访问;您需要(至少一个)此操作的SUPER权限

2)

set auto_increment_increment = 1;
set auto_increment_offset = 1;

之后我通过这个命令检查了它,

SHOW VARIABLES LIKE 'auto_inc%';

结果:

Variable_name                 Value     
auto_increment_increment      10
auto_increment_offset         1

可能是什么原因?

当我向clearDB提交票证时,他们回复了我:

ClearDB uses circular replication to provide master-master MysqL support. As such,certain things such as auto_increment keys (or sequences) must be configured in order for one master not to use the same key as the other,in all cases. We do this by configuring MysqL to skip certain keys,and by enforcing MysqL to use a specific offset for each key used. The reason why we use a value of 10 instead of 2 is for future development.

猜你在找的PHP相关文章