AWS Aurora: The MySQL server is running with the --read-only option so it cannot execute this statement(AWS Aurora:MySQL 服务器使用 --read-only 选项运行,因此无法执行此语句)
问题描述
我在 AWS 中的 Aurora 数据库实例上执行 GRANT 语句时收到此错误:
I am getting this error when executing a GRANT statement on my Aurora DB instance in AWS:
MySQL 服务器使用 --read-only 选项运行,因此无法执行此语句
The MySQL server is running with the --read-only option so it cannot execute this statement
我的用户不是只读的,为什么会发生这种情况?
My user is not read-only though, so why is this happening?
推荐答案
结果证明这是一个愚蠢的错误,但还是发布了,以防其他人遇到问题:
It turned out to be a silly mistake, but posting it anyway in case anyone else has the problem:
我错误地访问了副本实例 - 我复制了副本的端点,它显然是只读的.因此,如果您遇到此问题,请验证您是连接到主实例还是最好的数据库集群端点.
I was accessing the replica instance by mistake - I had copied the endpoint for the replica, and it is read-only apparently. So if you have this problem, verify that you are connecting to the Primary Instance or best of all the DB Cluster endpoint.
根据@Justin 的回答,我们绝对应该使用数据库集群:
According to @Justin's answer we definitely should use DB Cluster:
您需要连接到集群,而不是实例.这是因为实例似乎要轮流成为读者和作者.
You need to connect to the cluster, rather than an instance. This is because instances seem to take a turn to be the readers and writers.
这篇关于AWS Aurora:MySQL 服务器使用 --read-only 选项运行,因此无法执行此语句的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:AWS Aurora:MySQL 服务器使用 --read-only 选项运行,因此无法执行此语句
基础教程推荐
- 如何使用 mysql.connector 禁用查询缓存 2022-01-01
- 是否可以执行按位分组功能? 2021-01-01
- 需要 MySQL 5.1 中的抽象触发器来更新审计日志 2021-01-01
- 无法解决整理冲突 2021-01-01
- SSMS 中的权限问题:“对象 'extended_properties'、数据库 'mssqlsystem_resource'、... 错误 229)上的 SELECT 权限被拒绝" 2022-01-01
- SQL 效率:WHERE IN 子查询 vs. JOIN 然后 GROUP 2021-01-01
- SQL:使用来自具有相同列名的两个表中的数据... 2021-01-01
- SQL Server 实例在登录协商期间返回无效或不受支持的协议版本 2021-01-01
- 将 SQL Server DateTime 列迁移到 DateTimeOffset 2021-01-01
- 在 SQL 中连接多个表 2021-01-01
