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

Deadly 提交于 2019-12-04 15:55:35

问题


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

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?


回答1:


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.

Edit: 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.




回答2:


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.



来源:https://stackoverflow.com/questions/46665588/aws-aurora-the-mysql-server-is-running-with-the-read-only-option-so-it-cannot

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!