如何将Amazon Elastic Beanstalk MySQL RDS实例升级到5.6?

时间:2022-06-03 11:59:18

AWS provides guidelines as to how to upgrade a MySQL 5.5 instance to MySQL 5.6 using read replicas. However, its final step is to point your application to the new database, but EBS provides no mechanism through the web console to point your application to a different database. What is the recommended path to upgrading EBS-based RDS instances?

AWS提供了有关如何使用只读副本将MySQL 5.5实例升级到MySQL 5.6的指南。但是,最后一步是将应用程序指向新数据库,但EBS不通过Web控制台提供将应用程序指向其他数据库的机制。升级基于EBS的RDS实例的推荐路径是什么?

1 个解决方案

#1


0  

I generally advise users to provision the Database outside of Beanstalk, this issue being one of them.

我通常建议用户在Beanstalk之外配置数据库,这个问题就是其中之一。

Also

For a production environment, you may want to launch a database instance outside of your environment and configure your application to connect to it outside of the functionality provided by Elastic Beanstalk.

对于生产环境,您可能希望在环境之外启动数据库实例,并将应用程序配置为在Elastic Beanstalk提供的功能之外连接到它。

AWS RDS does support the 5.5 to 5.6 upgrade.

AWS RDS确实支持5.5到5.6的升级。

MySQL 5.5 to MySQL 5.6

MySQL 5.5到MySQL 5.6

https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_UpgradeDBInstance.MySQL.html

https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_UpgradeDBInstance.MySQL.html

But in your current setup.

但在你目前的设置中。

  1. Create a snapshot of the RDS database.
  2. 创建RDS数据库的快照。
  3. Provision an RDS Database outside of Beanstalk based on that snapshot
  4. 根据该快照在Beanstalk之外配置RDS数据库
  5. Provision a new Elastic Beanstalk environment and set these environment properties.
  6. 设置新的Elastic Beanstalk环境并设置这些环境属性。

In the Environment Properties section, define the variables that your application reads to construct a connection string. For compatibility with environments that have an integrated RDS DB instance, use the following:

在“环境属性”部分中,定义应用程序读取的变量以构造连接字符串。为了与具有集成RDS数据库实例的环境兼容,请使用以下命令:

RDS_HOSTNAME – The hostname of the DB instance.

RDS_HOSTNAME - 数据库实例的主机名。

Amazon RDS console label – Endpoint is the hostname.

Amazon RDS控制台标签 - Endpoint是主机名。

RDS_PORT – The port on which the DB instance accepts connections. The default value varies between DB engines.

RDS_PORT - 数据库实例接受连接的端口。数据库引擎之间的默认值不同。

. Amazon RDS console label – Port

。 Amazon RDS控制台标签 - 端口

RDS_DB_NAME – The database name, ebdb.

RDS_DB_NAME - 数据库名称ebdb。

Amazon RDS console label – DB Name

Amazon RDS控制台标签 - 数据库名称

RDS_USERNAME – The user name that you configured for your database.

RDS_USERNAME - 您为数据库配置的用户名。

Amazon RDS console label – Username

Amazon RDS控制台标签 - 用户名

RDS_PASSWORD – The password that you configured for your database.

RDS_PASSWORD - 您为数据库配置的密码。

https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/AWSHowTo.RDS.html

https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/AWSHowTo.RDS.html

#1


0  

I generally advise users to provision the Database outside of Beanstalk, this issue being one of them.

我通常建议用户在Beanstalk之外配置数据库,这个问题就是其中之一。

Also

For a production environment, you may want to launch a database instance outside of your environment and configure your application to connect to it outside of the functionality provided by Elastic Beanstalk.

对于生产环境,您可能希望在环境之外启动数据库实例,并将应用程序配置为在Elastic Beanstalk提供的功能之外连接到它。

AWS RDS does support the 5.5 to 5.6 upgrade.

AWS RDS确实支持5.5到5.6的升级。

MySQL 5.5 to MySQL 5.6

MySQL 5.5到MySQL 5.6

https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_UpgradeDBInstance.MySQL.html

https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_UpgradeDBInstance.MySQL.html

But in your current setup.

但在你目前的设置中。

  1. Create a snapshot of the RDS database.
  2. 创建RDS数据库的快照。
  3. Provision an RDS Database outside of Beanstalk based on that snapshot
  4. 根据该快照在Beanstalk之外配置RDS数据库
  5. Provision a new Elastic Beanstalk environment and set these environment properties.
  6. 设置新的Elastic Beanstalk环境并设置这些环境属性。

In the Environment Properties section, define the variables that your application reads to construct a connection string. For compatibility with environments that have an integrated RDS DB instance, use the following:

在“环境属性”部分中,定义应用程序读取的变量以构造连接字符串。为了与具有集成RDS数据库实例的环境兼容,请使用以下命令:

RDS_HOSTNAME – The hostname of the DB instance.

RDS_HOSTNAME - 数据库实例的主机名。

Amazon RDS console label – Endpoint is the hostname.

Amazon RDS控制台标签 - Endpoint是主机名。

RDS_PORT – The port on which the DB instance accepts connections. The default value varies between DB engines.

RDS_PORT - 数据库实例接受连接的端口。数据库引擎之间的默认值不同。

. Amazon RDS console label – Port

。 Amazon RDS控制台标签 - 端口

RDS_DB_NAME – The database name, ebdb.

RDS_DB_NAME - 数据库名称ebdb。

Amazon RDS console label – DB Name

Amazon RDS控制台标签 - 数据库名称

RDS_USERNAME – The user name that you configured for your database.

RDS_USERNAME - 您为数据库配置的用户名。

Amazon RDS console label – Username

Amazon RDS控制台标签 - 用户名

RDS_PASSWORD – The password that you configured for your database.

RDS_PASSWORD - 您为数据库配置的密码。

https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/AWSHowTo.RDS.html

https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/AWSHowTo.RDS.html