aws rds恢复数据库_Amazon RDS – AWS关系数据库服务

aws rds恢复数据库

Amazon RDS or AWS RDS is a relational database service on AWS Cloud. The database is an integral part of most of the applications. MySQL and PostgreSQL are one of the database engines which are highly used. In order to run your application on AWS Cloud, you need a web service that supports the relational database. Amazon RDS is that service in AWS cloud.

Amazon RDS或AWS RDS是AWS Cloud上的关系数据库服务。 数据库是大多数应用程序的组成部分。 MySQLPostgreSQL是使用率很高的数据库引擎之一。 为了在AWS Cloud上运行应用程序,您需要一个支持关系数据库的Web服务。 Amazon RDS是AWS云中的服务。

什么是Amazon RDS? (What is Amazon RDS?)

Amazon RDS is a highly scalable relational database service in AWS Cloud. It’s very easy to set up, scale, and operate a relational database like MySQL and PostgreSQL on the cloud. The service provides very easy to use and manage common database administration tasks. Amazon RDS is highly cost-efficient, resizable with industry standard relational database.

Amazon RDS是AWS Cloud中的高度可扩展的关系数据库服务。 在云上设置,扩展和操作关系数据库(如MySQL和PostgreSQL)非常容易。 该服务提供了非常易于使用和管理的常见数据库管理任务。 Amazon RDS具有很高的成本效益,可以通过行业标准的关系数据库进行调整大小。

It takes over many of the difficulties that you face in traditional deployments. Let’s take a look at some of them:

它可以解决您在传统部署中面临的许多困难。 让我们看一下其中的一些:

  • Amazon RDS manages the backup of your database automatically, You do not need to write scripts or cron jobs to do the backups.

    Amazon RDS自动管理数据库的备份,您无需编写脚本或cron作业即可进行备份。
  • Unlike in a traditional database, you don’t need to take care of CPU, IOPS, memory, and storage, etc. If you need fewer IOPS, more CPU, or more storage, you can easily allocate them without hassle.

    与传统数据库不同,您无需照顾CPU,IOPS,内存和存储等。如果您需要更少的IOPS,更多的CPU或更多的存储,则可以轻松分配它们。
  • You can use any database engine that you are familiar with like MySQL, PostgreSQL, Oracle, Microsoft SQL.

    您可以使用任何熟悉的数据库引擎,例如MySQL,PostgreSQL,Oracle,Microsoft SQL。
  • You can get the high availability with master-slave architecture. You can use read replicas to scale up the read queries in MySQL, PostgreSQL, and MariaDB.

    您可以通过主从架构获得高可用性。 您可以使用只读副本来扩展MySQL,PostgreSQL和MariaDB中的读取查询。
  • You can control who can access your RDS database by using Identity Access Management(IAM) of AWS.

    您可以使用AWS的Identity Access Management(IAM)控制谁可以访问您的RDS数据库。

为什么选择Amazon RDS? (Why Amazon RDS?)

There are several reasons to use Amazon RDS. Like any other service on AWS, RDS is also highly available, scalable, inexpensive, secure and easy to administer service. Let’s discuss a few of its benefits over traditional database setup and deployments:

使用Amazon RDS的原因有很多。 像AWS上的任何其他服务一样,RDS也是高度可用,可伸缩,廉价,安全且易于管理的服务。 让我们讨论它相对于传统数据库设置和部署的一些好处:

1.高度可扩展 (1. Highly Scalable)

You can scale your database storage and compute at any point in time. It takes very few steps to scale your database on AWS. You can also scale your database by creating the read replicas of your database. The primary database would always receive the write queries and all read queries will be handled by the read replicas.

您可以随时扩展数据库存储并进行计算。 只需很少的步骤即可在AWS上扩展数据库。 您还可以通过创建数据库的只读副本来扩展数据库。 主数据库将始终接收写查询,所有读查询将由只读副本处理。

2.可用性 (2. Availbility)

Amazon RDS is built on the top of the AWS infrastructure and uses the same network as the other service. To enhance the reliability for critical databases running on production, Amazon RDS takes database snapshots including automated backups.

Amazon RDS构建在AWS基础架构的顶部,并使用与其他服务相同的网络。 为了提高生产环境中运行的关键数据库的可靠性,Amazon RDS拍摄数据库快照,包括自动备份。

3.价格便宜 (3. Inexpensive)

You only pay for what you use. Like any other service on AWS, Amazon RDS is inexpensive in comparison to the cost that you spend on traditional database setup.

您只需为使用的商品付费。 与AWS上的任何其他服务一样,与您在传统数据库设置上花费的成本相比,Amazon RDS的价格便宜。

If you are a beginner then you can use RDS with AWS EC2 instance of free tier i.e. t2.micro.

如果您是初学者,则可以将RDS与免费层的AWS EC2实例(即t2.micro)一起使用。

AWS Free Tier RDS

AWS Free Tier RDS

AWS免费套餐RDS

4. RDS管理 (4. RDS Administration)

It’s very easy to administer the RDS. The provisions of the database server and managing the instances is done by AWS. You can get your RDS instances setup and work in a few minutes. You can view the performance insights, take snapshot by just click of a button and AWS does the automated backups for you. Several other administrative tasks you can do with Amazon RDS.

RDS的管理非常简单。 数据库服务器的配置和实例的管理由AWS完成。 您可以在几分钟内完成RDS实例的设置和工作。 您可以查看性能见解,只需单击一个按钮即可快照,AWS会为您自动备份。 您可以使用Amazon RDS执行其他几个管理任务。

5.大型RDS客户 (5. Big RDS clients)

Amazon RDS is one of the very popular and highly used services on AWS because of its benefits. Giants like Netflix and Expedia are using the RDS.

由于其优势,Amazon RDS是AWS上非常流行和高度使用的服务之一。 Netflix和Expedia等巨头正在使用RDS。

AWS RDS数据库引擎 (AWS RDS DB Engines)

Amazon supports many database engines including its own database engine which is much faster than other engines. Most of them are very popular database engines that you have already used. Below are the engines which are supported by AWS:

亚马逊支持许多数据库引擎,包括自己的数据库引擎,其速度比其他引擎快得多。 其中大多数是您已经使用的非常流行的数据库引擎。 以下是AWS支持的引擎:

  • Amazon Aurora

    亚马逊极光
  • PostgreSQL

    PostgreSQL
  • MySQL

    MySQL
  • MariaDB

    玛丽亚数据库
  • Oracle

    Oracle
  • SQL Server

    SQL服务器

We will take an example for most of these engines to do the instance setup in our next posts.

在接下来的文章中,我们将以大多数此类引擎为例来进行实例设置。

在AWS RDS中创建数据库实例 (Creating DB Instance in AWS RDS)

Let’s create a DB instance using the AWS RDS. The best way to create an instance is from the AWS management console.

让我们使用AWS RDS创建一个数据库实例。 创建实例的最佳方法是从AWS管理控制台。

  1. Sign in to the AWS Management Console https://aws.amazon.com/console/

    登录到AWS管理控制台https://aws.amazon.com/console/
  2. Open the Amazon RDS console at https://console.aws.amazon.com/rds/. Also, make sure that you selected the correct region from right top dropdown.

    通过以下网址打开Amazon RDS控制台: https://console.aws.amazon.com/rds/ 。 另外,请确保从右上角的下拉列表中选择了正确的区域。
  3. Click on the database in left navigation panel and you will see the below screen.
    Amazon Rds

    Amazon Rds

    单击左侧导航面板中的数据库,您将看到以下屏幕。

    亚马逊路

  4. Choose create database and select the DB engine. See below page for the reference.
    Select Db Engine

    Select Db Engine

    选择创建数据库,然后选择数据库引擎。 请参阅下页以获取参考。

    选择Db引擎

  5. Let’s select mySQL as DB engine and click on Next button.

    让我们选择mySQL作为数据库引擎,然后单击Next按钮。
  6. The next step is to choose your use case. If you are creating database for production then choose “Production – MySQL”. We will choose “Dev/Test – MySQL” in this tutorial.
    Choose Use Case

    Choose Use Case

    Now click on “next” button.


    选择用例

    现在单击“下一步”按钮。

  7. Specify DB Details: This is setup page for your DB instance.
    • License Model: License type associated with the database engine. MySQL has only license model general-public-license.
    • DB engine version: Version of MySQL, we will select the latest available on AWS 8.0.15
    • DB instance Class: Choose the DB instance class that allocates the computational, network, and memory capacity required by planned workload of this DB instance. We will select db.t2.micro – 1 vCPU, 1 GiB RAM.
    • Select storage type as SSD and allocate storage as per your database size. Let’s select SSD as type and 20GiB storage.
    • AWS will show you the monthly cost as per your selection. In our case below is the cost.
      Estimated Rds Cost

      Estimated Rds Cost


      Note: If your account is eligible for free teir then there would be no cost.
    • Add DB settings like user name and password.

      Database Settings

      Click on “Next” button.

    指定数据库详细信息:这是数据库实例的设置页面。
    • 许可证模型:与数据库引擎关联的许可证类型。 MySQL只有许可证模型general-public-license
    • 数据库引擎版本: MySQL 版本 ,我们将选择AWS 8.0.15上可用的最新版本
    • 数据库实例类:选择分配该数据库实例计划的工作量所需的计算,网络和内存容量的数据库实例类。 我们将选择db.t2.micro – 1个vCPU,1个GiB RAM。
    • 选择存储类型为SSD并根据数据库大小分配存储。 让我们选择SSD作为类型和20GiB存储。
    • AWS将根据您的选择向您显示每月费用。 在我们的例子中,以下是成本。
      估算的Rds费用

      估算的Rds费用


      注意:如果您的帐户有资格获得免费电话,则无需付费。
    • 添加数据库设置,例如用户名和密码。

      数据库设置

      点击“下一步”按钮。

  8. Now, Configure the advanced settings like network secuurity, database options, encryptions and backups.
    • Network & Security: You can choose the default VPC and default subnet group for now. Read about AWS VPC for more understanding.
    • Database options: Give the database name, port etc.
      Database Options

      Database Options

      There are many other settings available to configure in RDS. We have selected most of the important configuration to launch our first database instance.

    现在,配置高级设置,例如网络安全性,数据库选项,加密和备份。
    • 网络和安全性:您现在可以选择默认的VPC和默认子网组。 阅读有关AWS VPC的更多信息。
    • 数据库选项:提供数据库名称,端口等。

      数据库选项

      在RDS中可以配置许多其他设置。 我们选择了大多数重要的配置来启动我们的第一个数据库实例。

  9. Click on “Create Database”, AWS will take few seconds to create and then few minutes to configure and launch your first database instance on RDS.
    Database Created

    Database Created

    单击“创建数据库”,AWS将花费几秒钟来创建,然后花费几分钟来配置和启动RDS上的第一个数据库实例。

    数据库创建

连接到AWS RDS实例 (Connecting to the AWS RDS Instance)

Your DB instance is ready to be connected. Make sure that you remember the user name and password that you provided during the creation of DB instance.

数据库实例已准备好连接。 确保记住创建数据库实例期间提供的用户名和密码。

You can connect the MySQL database as you usually connect. I will show you to connect from the console.

您可以像平常一样连接MySQL数据库。 我将告诉您从控制台进行连接。

Please replace the endpoint, username, and password from your instance details. You can get these details from connectivity & Security. I cannot add screen here for security reasons.

请从您的实例详细信息中替换端点,用户名和密码。 您可以从连接性和安全性中获取这些详细信息。 出于安全原因,我无法在此处添加屏幕。

deepak@localhost> mysql -h  -P 3306 -u  -p

You will see the below details upon successful connection.

成功连接后,您将看到以下详细信息。

Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 200
Server version: 8.0.15-log MySQL Community Server (GPL)

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql>

翻译自: https://www.journaldev.com/29274/amazon-rds-aws-relational-database-service

aws rds恢复数据库

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值