微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

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.

原文地址:https://www.jb51.cc/php/130387.html

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐