我将一个 Web 应用程序部署到 CloudBees,并使用一键式 GUI 创建了一个 MySQL 数据库。它看起来像 auto_increment_increment
选项设置为 10(表中的 id
每增加一个新行就会增加 10)。我尝试更改 auto_increment_increment
:
SET GLOBAL auto_increment_increment=1;
但是我得到一个错误:错误代码:1227。访问被拒绝;您需要(至少其中一项)此操作的 SUPER 权限
。
如何更改 auto_increment_increment
?
最佳答案
在您的提供商中进行扩展配置....
根据manual :
The SUPER privilege is required to set global variables.
因此您需要与具有此权限的用户一起访问,您应该向您的提供商询问。
当然你可以为你的 session 改变这个变量:
SET SESSION auto_increment_increment=1;
您不需要任何特殊权限即可执行此操作
关于mysql - 在 Web 托管提供商的数据库中更改 `auto_increment_increment`,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25619510/