AWS创建一个只读的复制品,可以修改用于报告脚本

发布于 2025-02-12 12:31:15 字数 486 浏览 2 评论 0原文

我正在考虑在AWS中的群集中创建一个只读的副本,该复制品可以在其上播放的脚本,以用作数据库,我们将将前端仪表板连接到KPI和报告类型指标。该数据库将需要使用脚本进行修改,这些脚本将这些指标从中写入信息中,并将其写入此仅阅读副本的新表中。

发动机:5.7.mysql_aurora.2.07.2 到目前为止,我已经能够:

  1. “添加读取”集群中,创建仅读取数据库。
  2. 创建一个自定义参数组,修改字段read_only = 0,然后重新引导数据库与新参数组同步。
  3. 又一次的问题(请参见下文)尝试创建一个具有read_only = 0的自定义群集参数组。没有改变。
  4. 尝试从两个主机URL连接,并成功连接与仅读取的复制连接中的端点状态,以及群集中的主机URL,带有相同的结果。

问题是,当我去测试并为我们的数据库编写新记录时,它给了我通用: 错误1290:1290:MySQL Server使用 - 仅Read-Read选项运行,因此无法执行此语句

I'm looking at creating a read-only replica inside our cluster in AWS that can have nightly scripts run on it to be used as a database that we will attach a front-end dashboard to for KPI and reporting type metrics. This database will need to be modified with scripts that will write information out of it for these metrics into a new table inside of this read-only replica.

ENGINE: 5.7.mysql_aurora.2.07.2
So far I've been able to:

  1. "Add read" inside the cluster, creating a read only database.
  2. Create a custom parameter group, modify field read_only=0 and reboot databases to sync with the new parameter group.
  3. After issue (see below) tried to create a custom cluster parameter group with read_only=0. No Change.
  4. Tried connecting from both host URL's, and have successful connections with both the endpoint inside the read-only replica connectivity&status, as well as the host URL from the cluster with the .ro with the same result.

The issue is that when I go to test and write a new record to our DB it is giving me the generic:
ERROR 1290: 1290: The MySQL server is running with the --read-only option so it cannot execute this statement

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

泅人 2025-02-19 12:31:15

解决问题:

查询SQL变量要查看Inodb_read_only = 1(假设您正在运行一个主实例,而不是多主实例;以及以IT = 1开头的引擎),关闭服务器,创建文件以更改为ALTER启动更改Innodb_read_only = 0的服务器变量,然后重新启动。

Issue resolved:

query sql variables to see iff innodb_read_only=1 (assuming you're running a single master instance, not a multi-master; as well as an engine that starts with it =1), shut down server, create file to alter server variables on boot changing innodb_read_only=0, then reboot.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文