rds

Spring cloud with RDS, hello world

≡放荡痞女 提交于 2019-12-10 11:46:12
问题 I am newbie to Spring Cloud and wanted to write a simple "hello world" RDS program. My configuration is stored in the xml config as follows. <aws-context:context-credentials> ... </aws-context:context-credentials> <aws-context:context-region region="ap-southeast-1" /> <jdbc:data-source db-instance-identifier="amazonrds" password="${password}" read-replica-support="false"> <jdbc:pool-attributes initialSize="1" defaultCatalog="Records" testOnBorrow="true" validationQuery="SELECT 1" /> </jdbc

How to export using DATA_PUMP to S3 bucket?

≡放荡痞女 提交于 2019-12-10 11:43:31
问题 We have RDS (Oracle) instance, I need to export specific Schema into dumpfile. Export works and copies dump file into DATA_PUMP_DIR. Issue is that RDS do not have file directory access. I need exported DMP file either on S3 or copy to another EC2 instance. The article: LINK talks about copying data dump file between two RDS instances but not to S3 or EC2. 回答1: There are several ways to solve this problem. First option. Install a free database version of the Oracle XE version on EC2 instance

阿里云RDS读写分离数据查询延迟解决

安稳与你 提交于 2019-12-10 06:36:37
环境: mysql数据库,上到阿里云RDS中。 实现了读写分离。 问题 数据库中表更新后,查询不到数据(偶发) 原因 没有实现微服务。 由于我们数据库在阿里云的RDS中实现了读写分离。受限于mysql本身原因导致数据产生延迟,所以数据在读写实例中查询不到,不走后面的代码。 解决 修改方案:在sql中添加注释 "/ FORCE_MASTER /",指定后续 SQL 到主实例执行。 修改如下(下面是举例): 原sql: select * from table_name 修改后sql: /*FORCE_MASTER*/ select * from table_name 问题引发的技术点(开发人员必看): 数据库在阿里云的RDS中实现了读写分离。写操作是在主实例中,读操作在只读实例中,正常情况下只读实例不会有延迟产生。 但受限于 MySQL 本身的复制机制,若同步日志的应用时间较久,会产生数据同步的延迟,这个是 MySQL 尚无法在技术手段上规避的问题。 因此我们在sql层面进行处理,RDS 读写分离支持的 Hint 格式为 / FORCE_MASTER /,指定后续 SQL 到主实例执行。 举例: / FORCE_MASTER / SELECT * FROM table_name;** 官方文档: https://help.aliyun.com/knowledge_detail

How can I change the “Database Name” in AWS RDS for Postgresql?

爱⌒轻易说出口 提交于 2019-12-07 06:24:40
问题 I wanted to create a replicate of my production database for staging and created the staging DB instance from a production snapshot. However, this new instance still has the Database Name: "production-database". I was able to rename the database on PSQl to "staging-databse," but this is not reflected in the AWS Console. I'm afraid that future developers will be very confused, and was wonderign how to rename the "Database Name" on AWS? 回答1: Don't use the default database option. All it does is

10.1.1 使用亚马逊的RDS创建PostgreSQL数据库

风格不统一 提交于 2019-12-06 09:59:13
在开始本节之前,我们需要创建和配置AWS账户。完成之后,我们的第一项任务就是创建要用于EagleEye服务的PostgreSQL数据库。要做到这一点,我们将要登录到AWS控制台并执行以下操作。 (1)在第一次登录到控制台时,我们将看到一个亚马逊Web服务列表。找到RDS的链接并点击它,进入RDS仪表板。 (2)在仪表板上找到一个上面写着“Launch a DB Instance”的大按钮并点击它。 (3)RDS支持不同的数据库引擎。 此时,应该能看到一个数据库列表。选择PostgreSQL,然后点击“Select”按钮。这将启动数据库创建向导。 亚马逊的数据库创建向导首先会询问这是生产数据库(Production)还是开发/测试(Dev/Test)数据库。我们将使用免费套餐创建开发/测试数据库。图10-2展示了这个界面。 图10-2 选择数据库是生产数据库还是测试数据库 接下来,我们将创建有关PostgreSQL数据库的基本信息,并设置将要使用的主用户ID和密码来登录数据库。图10-3展示了这个界面。 图10-3 设置基本数据库配置 创建的数据库实例标识符为:eagle-eye-aws-dev,主用户名为:postgres_aws_dev,密码为:postgres_aws_dev 该向导的最后一步是创建数据库安全组、端口信息和数据库备份信息。图10-4展示了这个界面的内容。 图10

烂泥:阿里云RDS本地恢复数据

人盡茶涼 提交于 2019-12-06 09:39:31
本文由 ilanniweb 提供友情赞助,首发于 烂泥行天下 想要获得更多的文章,可以关注我的微信ilanniweb 公司目前使用的数据库是阿里云的RDS,目前RDS的版本为mysql5.6。如下: 现在要求把RDS的数据,在公司内部本地进行恢复。 如何把RDS在本地进行恢复呢?这个阿里云官网给出了相关的操作教程,连接如下:《 RDS备份文件恢复到自建数据库 》。 看了官网的教程,感觉很是麻烦,而且也有几个比较特殊的地方没有点出来,下面是我对RDS本地恢复的步骤。 一、安装mysql数据库 在进行RDS本地恢复数据之前,我们需要先在本地服务器上安装mysql的5.6版本,因为RDS是5.6版本,所以我们本地的mysql数据库要与RDS版本对应。 rpm -ivh http://repo.mysql.com/mysql-community-release-el6-5.noarch.rpm && yum -y install mysql-server mysql mysql数据库安装完毕后,我们现在来下载RDS备份。 二、下载RDS备份 RDS本身是有备份,而且是可以在RDS的管理后台自定义备份策略,如下: 我们可以在RDS备份列表中下载已经备份好的RDS文件,如下: 通过上图,我们可以很明显的看到RDS的备份是全量备份的,而且是物理备份的。 三、解压 RDS 备份文件

How to configure Elastic Beanstalk for RDS

假如想象 提交于 2019-12-06 08:00:54
I have a requirement to deploy both a production and staging application using AWS Elastic Beanstalk. I would like the production environment to use an independently created RDS database so I can rebuild my environment without tearing down my RDS database. I would like the staging environment to create a brand new RDS database each time it is deployed. After initialising my environment with eb init one of the questions ask Create an RDS DB Instance? [y/n]: The result of this configuration appears to be stored in a file "config" within the .elasticbeanstalk directory. This directory is added to

unable to make RDS queries on heroku

你。 提交于 2019-12-05 21:14:09
I can access my RDS postresql database on a local machine no problem. settings.py DATABASES = { 'default': { 'ENGINE': 'django.db.backends.postgresql_psycopg2', 'NAME': 'xxxxxxx', 'USER': 'XXXXXXXX', 'PASSWORD': 'XXXXXXXX', 'HOST': 'XXXXXXrds.amazonaws.com', 'PORT': '5432', } I pushed this to Heroku and I get a ProgrammingError at /saferdb/query/ In manage.py shell on heroku I tried to access the database: >>> from saferdb.models import Question >>> q = Question.objects.all() >>> q.count() got the following error: Traceback (most recent call last): File "/app/.heroku/python/lib/python3.6/site

Can't access to RDS from Amazon Lambda, same VPC and correct role permissions

坚强是说给别人听的谎言 提交于 2019-12-05 14:46:11
i can't successfully connect to RDS from Amazon Lambda in production. For Amazon Lambda i'm using Serverless framework, executing sls offline i can connect with RDS from localhost, but in production Amazon Lambda doesn't. Both are in same VPC, in same security group, that has all traffic inbound access, and a rule that is pointing to Vpc's CIDR. I have these permissions attached: AmazonRDSFullAccess, AWSLambdaFullAccess, AmazonVPCFullAccess, AWSLambdaExecute and AWSLambdaVPCAccessExecutionRole. Thank's for help. I had this issue and the following is a summary of the steps I took to resolve: In