rds mysql

MySQL on Amazon RDS is the most popular and used database service of AWS Cloud. I will recommend to read our post on Amazon RDS – AWS Relational Database Service to get an understanding of AWS RDS.

Amazon RDS上MySQL是AWS Cloud最受欢迎和使用最多的数据库服务。 我建议阅读有关Amazon RDS – AWS Relational Database Service的文章 ,以了解AWS RDS。

MySQL is one of the most popular open-source databases in the world. MySQL on RDS offers the rich features of the MySQL community edition with the flexibility to easily scale compute resources or storage capacity for your database.

MySQL是世界上最受欢迎的开源数据库之一。 RDS上MySQL提供了MySQL社区版的丰富功能,并具有可轻松扩展数据库的计算资源或存储容量的灵活性。

AWS RDS上受支持MySQL版本 (Supported Versions of MySQL on AWS RDS)

Amazon RDS supports several versions of MySQL. Following major versions are supported by AWS:

Amazon RDS支持多种版本MySQL。 AWS支持以下主要版本:

  • MySQL 5.5MySQL 5.5
  • MySQL 5.6MySQL 5.6
  • MySQL 5.7MySQL 5.7
  • MySQL 8.0MySQL 8.0

MySQL maintains versions of database engines in the form of X.Y.Z. In general, X.Y denotes the major version of MySQL which is being maintained by AWS. For example, MySQL 5.6 and 5.7 are major versions whereas 5.6.40 and 5.6.41 are the minor versions.

MySQL维护XYZ形式的数据库引擎版本通常,XY表示由AWS维护MySQL的主要版本。 例如,MySQL 5.6和5.7是主要版本,而5.6.40和5.6.41是次要版本。

Here is the list of all minor and major MySQL versions supported by Amazon RDS.

这是Amazon RDS支持的所有次要和主要MySQL版本的列表。

Major Version Minor Version
MySQL 5.5
  • MySQL 5.5.46
  • MySQL 5.5.53
  • MySQL 5.5.54
  • MySQL 5.5.57
  • MySQL 5.5.59
  • MySQL 5.5.61
MySQL 5.6
  • MySQL 5.6.34
  • MySQL 5.6.35
  • MySQL 5.6.37
  • MySQL 5.6.39
  • MySQL 5.6.40
  • MySQL 5.6.41
MySQL 5.7
  • MySQL 5.7.16
  • MySQL 5.7.17
  • MySQL 5.7.19
  • MySQL 5.7.21
  • MySQL 5.7.22
  • MySQL 5.7.23
  • MySQL 5.7.24
  • MySQL 5.7.25
MySQL 8.0
  • MySQL 8.0.11
  • MySQL 8.0.13
  • MySQL 8.0.15
主要版本 次要版本
MySQL 5.5
  • MySQL 5.5.46
  • MySQL 5.5.53
  • MySQL 5.5.54
  • MySQL 5.5.57
  • MySQL 5.5.59
  • MySQL 5.5.61
MySQL 5.6
  • MySQL 5.6.34
  • MySQL 5.6.35
  • MySQL 5.6.37
  • MySQL 5.6.39
  • MySQL 5.6.40
  • MySQL 5.6.41
MySQL 5.7
  • MySQL 5.7.16
  • MySQL 5.7.17
  • MySQL 5.7.19
  • MySQL 5.7.21
  • MySQL 5.7.22
  • MySQL 5.7.23
  • MySQL 5.7.24
  • MySQL 5.7.25
MySQL 8.0
  • MySQL 8.0.11
  • MySQL 8.0.13
  • MySQL 8.0.15

Please check supported and unsupported features and plugins of MySQL on AWS RDS before getting started.

在开始之前,请检查AWS RDS上受支持和不受支持MySQL功能和插件。

Amazon RDS上MySQL的存储引擎 (Storage Engines of MySQL on Amazon RDS)

MySQL supports a number of database storage engines, you can find the complete list here at MySQL official documentation https://dev.mysql.com/doc/refman/8.0/en/storage-engines.html.

MySQL支持许多数据库存储引擎,您可以在此处找到完整的列表,请访问MySQL官方文档https://dev.mysql.com/doc/refman/8.0/en/storage-engines.html 。

Amazon RDS doesn’t support all MySQL database storage engines as not all of them are optimized for data durability and recovery. Amazon RDS fully supports InnoDB storage engines for MySQL RDS instances. It also supports MyISAM database storage engine but not all features are supported fully. For example, the MyISAM storage engine does not support reliable recovery and may result in data loss and/or corruption of data when MySQL is restarted after recovery for user-created schemas. These issues prevent Point-In-Time restore or snapshot restore from working as intended.

Amazon RDS不支持所有MySQL数据库存储引擎,因为并非所有MySQL数据库存储引擎都针对数据持久性和恢复进行了优化。 Amazon RDS完全支持MySQL RDS实例的InnoDB存储引擎。 它还支持MyISAM数据库存储引擎,但并非完全支持所有功能。 例如,MyISAM存储引擎不支持可靠的恢复,并且在针对用户创建的模式进行恢复后重新启动MySQL时,可能会导致数据丢失和/或数据损坏。 这些问题使即时点还原或快照还原无法按预期工作。

运行MySQL的RDS上的数据库实例 (DB instance on RDS running MySQL)

We took an example of creating a database instance on Amazon RDS running MySQL in Amazon RDS – AWS Relational Database Service. Here, we will explore each option in detail.

我们以在Amazon RDS-AWS Relational Database Service中运行MySQL的Amazon RDS上创建数据库实例为例。 在这里,我们将详细探讨每个选项。

创建实例 (Create Instance)

Let’s create a database instance running MySQL on Amazon RDS. We will use the AWS management console for this:

让我们创建一个在Amazon RDS上运行MySQL的数据库实例。 我们将为此使用AWS管理控制台:

  1. Sign in to AWS Management Console at https://aws.amazon.com/console/通过https://aws.amazon.com/console/登录到AWS管理控制台
  2. Open Amazon RDS service from console https://console.aws.amazon.com/rds/从控制台https://console.aws.amazon.com/rds/打开Amazon RDS服务
  3. Please make sure that you have choosen correct region from top right corner.请确保您从右上角选择了正确的区域。
  4. Click on link database in left navigation panel单击左侧导航面板中的链接数据库
  5. Choose Create database, see the below screenshot for your referenece:

    Create Database

    选择创建数据库 ,请参阅下面的屏幕快照以供参考:

    创建数据库

  6. You will see an option “Easy create”, turn it off to understand most of the available options. Please see the screenshot below for your reference:

    Easy Create Database

    您将看到一个“轻松创建”选项,将其关闭以了解大多数可用选项。 请参阅以下屏幕截图,以供参考:

    轻松创建数据库

  7. Choose MySQL in engines option, see screenshot for your reference:

    Storage Engine Mysql

    Choose specific version for MySQL as per your requirements, We will choose 5.7.22 in this tutorial:

    Mysql Edition And Version

    Note: Never forgot to read known issues and limitation of the selected edition and version of MySQL. It’s important to know these things as you may need any of them in your production instance.

    MySQL”选项,请参见屏幕截图以供参考:

    存储引擎Mysql

    根据您的要求选择特定MySQL版本,在本教程中,我们将选择5.7.22:

    Mysql版本和版本

    注意:永远不要忘记阅读MySQL版本的已知问题和限制。 了解这些内容很重要,因为在生产实例中可能需要其中的任何内容。

  8. In Templates, choose that fits well in your use case. If you will select production then many options like Multi-AZ failover option and Provisioned IOPS storage option will default come selected in later stages.

    Database Templates

    We will choose Dev/Test template, if you are eligible for free teir then you can choose “Free tier” template.

    多可用区故障转移选项预配置IOPS存储选项。

    数据库模板

    我们将选择开发/测试模板,如果您有资格获得免费试用,则可以选择“免费套餐”模板。

  9. Settings: Give a unique DB instnace identifier. In the second section open credentials section.
    • Do not select “Auto generate a password” as we would like to give our own password.
    • Enter master username in case you want different user name than generated.
    • Choose a Password and Confirm Password

    Database Settings

    设置 :提供唯一的数据库实例标识符。 在第二部分中,打开凭据部分。

    • 不要选择“自动生成密码”,因为我们要输入自己的密码。
    • 如果你想比产生不同的用户名输入用户名高手。
    • 选择一个密码确认密码

    数据库设置

  10. Select DB Instnace Size, the selection is completely based on your application’s need. We will choose db.m4.large (2 vCPUs, 8 GiB RAM, EBS: 450Mbps).

    Db Instnace Size

    选择DB Instnace Size ,选择完全取决于您的应用程序需求。 我们将选择db.m4.large(2个vCPU,8个GiB RAM,EBS:450Mbps)。

    Db装置尺寸

  11. Choose Storage type and allocate memory. Make sure that you are doing right selection otherwise choosing less storage may results into latency issues.

    Storage

    Amazon RDS is designed to auto-scale, you can enable auto-scaling of the database based on the storage capacity used for your database. In the screenshot above, the database will scale from a minimum of 21 GiB to maximum 1000 GiB.

    Note: You can always mention the maximum storage threshold in auto-scaling.

    存储类型并分配内存 。 确保选择正确,否则选择较少的存储可能会导致延迟问题。

    存储

    Amazon RDS旨在自动扩展,您可以基于用于数据库的存储容量来启用数据库的自动扩展。 在上面的屏幕截图中,数据库将从最小的21 GiB扩展到最大的1000 GiB。

    注意:您始终可以在自动扩展中提及最大存储阈值。

  12. Availability & durability: This is default applicable when you will choose production template while creating instance. You can choose to create a standby instance. This will create a Replica in Different Zone to have Amazon RDS maintain a synchronous standby replica in a different Availability Zone than the DB instance.

    Availability And Durability

    可用性和耐用性 :当您在创建实例时选择生产模板时,默认情况下适用。 您可以选择创建一个备用实例。 这将在不同区域中创建副本,以使Amazon RDS在与数据库实例不同的可用区域中维护同步备用副本。

    可用性和耐用性

  13. Connectivity: If you have created VPC then you can choose one from the dropdown OR AWS will create a VPC for you. Please learn more about VPC – Virtual Private Cloud if you are a beginner.

    Connectivity And Vpc

    Note: Once the database has been created, you cannot change the VPC.

    连接性:如果已创建VPC,则可以从下拉列表中选择一个,否则AWS会为您创建一个VPC。 如果您是初学者,请了解有关VPC –虚拟私有云的更多信息。

    连接性和Vpc

    注意:创建数据库后,您将无法更改VPC。

  14. Additional COnfigurations: There are several other configurations is available, you can choose as per your use case. For example, Database options, encryption enabled, backup enabled, backtrack disabled, Performance Insights enabled, Enhanced Monitoring enabled, maintenance, CloudWatch Logs, delete protection disabled其他配置:还有其他几种配置可用,您可以根据您的用例进行选择。 例如,数据库选项,启用加密,启用备份,禁用回溯,启用Performance Insights,启用增强监控,维护,CloudWatch Logs,禁用删除保护
  15. Now, it’s time to see the estimated cost of the setup that we are going to do. If you think it’s too higher than expected then you can change the storage and DB class. You can also calculate the cost from AWS Cost calculator before creating the instance.

    Estimated Monthly Cost

    现在,该查看我们将要进行的设置的估计成本了。 如果您认为它比预期的要高,那么可以更改存储和数据库类。 您还可以在创建实例之前通过AWS Cost计算器计算成本。

    估计每月费用

  16. Choose Create database. AWS will take sometime to create your database, In Meantime, you will see the below screen:

    Creating Database

    You can view the credentials by clicking on the button in the top right.

    创建数据库 。 AWS将花费一些时间来创建数据库,同时,您将看到以下屏幕:

    创建数据库

    您可以通过单击右上角的按钮来查看凭据。

  17. Once the creation is done, you will see the status updated as available.

    Database Created

    创建完成后,您将看到状态更新为可用。

    数据库创建

连接到数据库实例 ( Connect to DB Instance)

We have learned how to connect to the database from the console in our post Amazon RDS – AWS Relational Database Service. I am going to use the same way here as well:

我们在Amazon RDS – AWS Relational Database Service中了解了如何从控制台连接到数据库。 我也将在这里使用相同的方式:

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 endpoint -P 3306 -uusername  -ppassword

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: 5.7.22-log MySQL Community Server (GPL)Type 'help;' or '\h' for help. Type '\c' to clear the buffer.mysql>

监控方式 (Monitoring)

There are several CloudWatch matrices available to monitor various aspect of your database instance. Few important matrices are given below:

有几种CloudWatch矩阵可用于监视数据库实例的各个方面。 以下是一些重要的矩阵:

Monitoring Matrices

监控矩阵

You can also check Read and Write IOPS, Read and Write throughput, etc.

您还可以检查读写IOPS,读写吞吐量等。

删除你的数据库 (Delete your Database)

You can delete your database if you are no longer using it but make sure that you have taken a snapshot or backup of the database before deleting it.

如果不再使用数据库,则可以删除它,但是在删除数据库之前,请确保已对数据库进行了快照或备份。

Make sure that your database instance is not running, otherwise, AWS will not allow you to delete the database instance. For this, go to actions and click on stop and you will see the below screen:

确保您的数据库实例未运行,否则,AWS将不允许您删除数据库实例。 为此,请转到操作并单击停止,您将看到以下屏幕:

Stop Database

停止数据库

Now, Go to the database, select it and choose delete from actions.

现在,转到数据库,选择它,然后选择“从操作中删除”。

Delete Database

删除数据库

Click on delete and it will ask you to create final snapshot, retain automated backups, etc. Please see the screenshot below for your reference:

单击删除,它将要求您创建最终快照,保留自动备份等。请参阅下面的屏幕快照以供参考:

Delete Database Options

删除数据库选项

AWS will take some time to delete your instance, you will see the below screen in meantime.

AWS将需要一些时间来删除您的实例,同时您将看到以下屏幕。

Delete Your Database

删除数据库

In our next post, we will discuss backing up ad restoring database instance on AWS RDS.

在我们的下一篇文章中,我们将讨论在AWS RDS上备份广告还原数据库实例。

翻译自: https://www.journaldev.com/31477/mysql-on-amazon-rds

rds mysql

rds mysql_Amazon RDS上MySQL相关推荐

  1. aws rds监控慢sql_在AWS RDS SQL Server上使用SSIS包

    aws rds监控慢sql In the first part of the article, Explore SQL Server Integration Services (SSIS) on AW ...

  2. aws rds监控慢sql_在AWS RDS SQL Server上的SSAS中部署表格数据库

    aws rds监控慢sql In this article, we are going to explore Analysis Service for AWS RDS SQL Server in de ...

  3. aws rds监控慢sql_探索AWS RDS SQL Server上SQL Server集成服务(SSIS)

    aws rds监控慢sql In the previous article, Deploy tabular databases in SSAS on AWS RDS SQL Server, we ex ...

  4. mysql和windows连接不上_问题-jdbc连接不上mysql,windows下开启两个mysql服务

    1.问题: 前两天安装了个php 环境- wamp,由于我自己电脑上本身带有 mysql的数据库,在安装完后,没有注意到,mysql已经指向了 刚安装好的wamp里的mysql .导致 之前的 mys ...

  5. datagrip mysql乱码_DataGrip和IDEA无法连接上Mysql问题解决方法详解

    DataGrip无法连接上Mysql问题解决方案[08001] 该方法也适用于IDEA中的MYSQL插件无法连接的问题 一.软件版本 1.IDEA 2020.1.1 2.DataGrip 2019.1 ...

  6. 在ubuntu上mysql出现ERROR 1045(28000):Access denied for user ‘young‘@’localhost‘(using password:NO)...

    刚在ubuntu12.04.02上安装了mysql.在终端输入mysql后,出现如下错误: 在ubuntu上mysql出现ERROR 1045(28000):Access denied for use ...

  7. mysql爆内存_线上MySQL数据库机器内存爆掉原因分析与解决

    本文主要向大家介绍了线上MySQL数据库机器内存爆掉原因分析与解决,通过具体的内容向大家展现,希望对大家学习MySQL数据库有所帮助. 现象: 阿里金融某业务的MySQL机器的内存每隔几天就会增长,涨 ...

  8. mysql linux改密码忘记了怎么办_linux上mysql改密码忘了怎么办?

    解决方法:1.在my.cnf中,增加"[mysqld]"和"skip-grant-tables"2行代码,用于登录时跳过密码验证:2.启动mysql服务,并登录 ...

  9. linux mysql 确认命令_LINUX启动/重启/停上MYSQL的命令(详解)

    如何启动/停止/重启MySQL 一.启动方式 1.使用 service 启动:service mysqld start 2.使用 mysqld 脚本启动:/etc/inint.d/mysqld sta ...

最新文章

  1. 30 天精通 RxJS (05): 建立 Observable(一)
  2. 强迫症犯了,忍不住赞一下slf4j包Logger.java的优雅代码
  3. 高性能全数字嵌入式仿真测试软件SkyEye支持多达70余种核心
  4. NPL之如何使用Glove--词向量转化
  5. 阿里云 远程 mysql_阿里云 远程mysql
  6. 异常详细信息: System.Web.HttpException: 服务器太忙
  7. 老生常谈!数据库如何存储时间?你真的知道吗?
  8. 全国市场调查大赛经验分享(二)
  9. Android模拟器中实现音、视频文件的断点播放
  10. java 改变字体大小_java – 根据屏幕大小更改字体大小
  11. Android 简历+面试题 汇总
  12. 中台搞了2年,项目叫停,CIO被裁!本以为中台是道送分题,没想到是送命题!...
  13. ASIHTTPRequest 状态栏网络等待指示器
  14. Spring Security4 CSRF 如何关闭CSRF功能
  15. 自学python推荐廖雪峰网站
  16. vue 能拿到对象 打印对象 但获取不到具体属性 属性 undefined
  17. 单目运算符和双目运算符
  18. 冲破测试职业天花板--《笑傲测试》读后感
  19. 2. Packet crafting tools (封包工具 6个)
  20. 百度计算广告学沙龙学习笔记 - 品牌展示广告

热门文章

  1. junit框架——单元测试
  2. javascript 布尔类型
  3. android (java) 网络发送get/post请求参数设置
  4. Oracle学习笔记之五sp1,PL/SQL之BULK COLLECT
  5. DevExpress lookupedit下拉列表不显示内容的问题
  6. 为什么我比别人差这么多?
  7. # 语音信号处理基础(十)——梅尔倒谱系数
  8. [转载] 【全面总结】Tensorflow 2.0+与Keras的联系与应用(含model详解)
  9. vivado中的OOC技术
  10. python socket 连续send,出现粘包问题