mysql - 在 Web 托管提供商的数据库中更改 `auto_increment_increment`

标签 mysql cloudbees

我将一个 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/

相关文章:

MySQL 外键值为 NULL

MySQL从一张表到另一张表的数据

jenkins - 在 Cloudbees Jenkins 文件夹中设置环境变量

jenkins - HipChat 与 Jenkins 集成

jenkins - 为什么 Jenkins CLI 不能在我们的 Dev@Cloud 实例上运行?

PHP 错误无法从 Android 应用程序中检索 LIKE 语句

php - mysqli_fetch_all 不从一个特定表中检索记录

java - MySQL 在 Preparing Statement 中以非常奇怪的行为被阻止

jenkins - 如何测试 Jenkinsfile

maven - 我应该如何处理在 Cloudbees Jenkins 构建中下载 Maven 依赖项的问题?