AWS Aurora:MySQL服务器使用--read-only选项运行,因此无法执行此语句

时间:2022-12-26 00:42:01

I am getting this error when executing a GRANT statement on my Aurora DB instance in AWS:

我在AWS中的Aurora数据库实例上执行GRANT语句时收到此错误:

The MySQL server is running with the --read-only option so it cannot execute this statement

MySQL服务器使用--read-only选项运行,因此无法执行此语句

My user is not read-only though, so why is this happening?

我的用户不是只读的,为什么会这样呢?

2 个解决方案

#1


21  

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.

我错误地访问了副本实例 - 我复制了副本的端点,它显然是只读的。因此,如果您遇到此问题,请验证您是连接到主实例还是连接到所有数据库群集端点。

#2


1  

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.

您需要连接到群集,而不是实例。这是因为实例似乎转而成为读者和作家。

#1


21  

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.

我错误地访问了副本实例 - 我复制了副本的端点,它显然是只读的。因此,如果您遇到此问题,请验证您是连接到主实例还是连接到所有数据库群集端点。

#2


1  

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.

您需要连接到群集,而不是实例。这是因为实例似乎转而成为读者和作家。