加入收藏 | 设为首页 | 会员中心 | 我要投稿 安卓应用网 (https://www.0791zz.com/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 编程开发 > PHP > 正文

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

发布时间:2020-05-25 08:45:38 所属栏目:PHP 来源:互联网
导读:我正在使用带有clearDB的 Windows Azure.当前数据库自动增量值为10.我希望它为1. 我试图在PHPMyAdmin中运行这些命令, 1) set global auto_increment_increment = 1;set global auto_increment_offset = 1; 错误:#1227 – 拒绝访问;您需要(至少一个)此操作的S

我正在使用带有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.

(编辑:安卓应用网)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读