Menu
Amazon Relational Database Service
User Guide (API Version 2014-10-31)

Modifying a DB Instance Running the MySQL Database Engine

You can change the settings of a DB instance to accomplish tasks such as adding additional storage or changing the DB instance class. This topic guides you through modifying an Amazon RDS MySQL DB instance, and describes the settings for MySQL instances. For information about additional tasks, such as renaming, rebooting, deleting, tagging, or upgrading an Amazon RDS DB instance, see Amazon RDS DB Instance Lifecycle. We recommend that you test any changes on a test instance before modifying a production instance so you better understand the impact of a change. This is especially important when upgrading database versions.

You can have the changes apply immediately or have them applied during the DB instance's next maintenance window. Applying changes immediately can cause an outage in some cases; for more information on the impact of the Apply Immediately option when modifying a DB instance, see Modifying an Amazon RDS DB Instance and Using the Apply Immediately Parameter.

AWS Management Console

To modify a MySQL DB instance

  1. Sign in to the AWS Management Console and open the Amazon RDS console at https://console.aws.amazon.com/rds/.

  2. In the navigation pane, click Instances.

  3. Select the check box for the DB instance that you want to change, click Instance Actions and then click Modify.

  4. In the Modify DB Instance dialog box, change any of the following settings that you want:

    Setting Description

    Instance Specifications

    DB Engine Version

    In the list provided, click the version of the MySQL database engine that you want to use.

    DB Instance Class

    In the list provided, click the DB instance class that you want to use. For information about instance classes, see DB Instance Class.

    Multi-AZ Deployment

    If you want to deploy your DB instance in multiple Availability Zones, click Yes; otherwise, click No .

    Storage Type

    Select the storage type you want to use. For more information about storage, see Storage for Amazon RDS.

    The following changes all result in a brief outage while the process starts. After that, you can use your database normally while the change takes place.

    • From General Purpose (SSD) to Magnetic.

    • From General Purpose (SSD) to Provisioned IOPS (SSD), if you are using a custom parameter group.

    • From Magnetic to General Purpose (SSD).

    • From Magnetic to Provisioned IOPS (SSD).

    • From Provisioned IOPS (SSD) to Magnetic.

    • From Provisioned IOPS (SSD) to General Purpose (SSD), if you are using a custom parameter group.

    Allocated Storage

    Specify how much storage, in gigabytes, to allocate for your DB instance. The minimum allowable value is 5 GB; the maximum is 6 TB. Note that you can only increase the amount of storage when modifying a DB instance, you cannot reduce the amount of storage allocated.

    Settings

    DB Instance Identifier

    You can rename the DB instance by typing a new name. When you change the DB instance identifier, an instance reboot will occur immediately if you set Apply Immediately to true, or will occur during the next maintenance window if you set Apply Immediately to false. This value is stored as a lowercase string.

    New Master Password

    Type a password for your master user. The password must contain from 8 to 41 alphanumeric characters. By resetting the master password, you also reset permissions for the DB instance. For more information, see Resetting the DB Instance Owner Role Password.

    Network and Security

    Subnet Group

    Choose the subnet group for the DB instance. You can use this setting to move your DB instance to a different VPC. If your DB instance is not in a VPC, you can use this setting to move your DB instance into a VPC. For more information, see Moving a DB Instance Not in a VPC into a VPC.

    Security Group

    Select the security group you want associated with the DB instance. For more information about security groups, see Working with DB Security Groups.

    Certificate Authority

    Select the certificate you want to use.

    Publicly Accessible

    Choose Yes to give the DB instance a public IP address, meaning that it will be accessible outside the VPC (the DB instance also needs to be in a public subnet in the VPC); otherwise, choose No, so the DB instance will only be accessible from inside the VPC. For more information about hiding DB instances from public access, see Hiding a DB Instance in a VPC from the Internet.

    Database Options

    Parameter Group

    Select the parameter group you want associated with the DB instance. Changing this setting does not result in an outage. The parameter group name itself is changed immediately, but the actual parameter changes are not applied until you reboot the instance without failover. The DB instance will NOT be rebooted automatically and the parameter changes will NOT be applied during the next maintenance window. For more information about parameter groups, see Working with DB Parameter Groups.

    Option Group

    Select the option group you want associated with the DB instance. For more information about option groups, see Working with Option Groups.

    Copy Tags to Snapshots

    Select this option to have any DB instance tags copied to a DB snapshot when you create a snapshot.

    Enable IAM DB Authentication

    Select Yes to enable IAM database authentication. For more information, see IAM Database Authentication for MySQL and Amazon Aurora

    Database Port

    Specify a new port you want to use to access the database.

    The port value must not match any of the port values specified for options in the option group for the DB instance.

    Your database will restart when you change the database port regardless of whether Apply Immediately is checked.

    Backup

    Backup Retention Period

    Specify the number of days that automatic backups will be retained. To disable automatic backups, set this value to 0.

    Note

    An immediate outage will occur if you change the backup retention period from 0 to a non-zero value or from a non-zero value to 0.

    Backup Window

    Set the time range during which automated backups of your databases will occur. Specify a start time in Universal Coordinated Time (UTC) and a duration in hours.

    Enable Enhanced Monitoring

    Choose Yes to enable gathering metrics in real time for the operating system that your DB instance runs on. For more information, see Enhanced Monitoring.

    Granularity

    Only available if Enable Enhanced Monitoring is set to Yes. Set the interval, in seconds, between when metrics are collected for your DB instance.

    Maintenance

    Auto Minor Version Upgrade

    If you want your DB instance to receive minor engine version upgrades automatically when they become available, click Yes. Upgrades are installed only during your scheduled maintenance window.

    Maintenance Window

    Set the time range during which system maintenance, including upgrades, will occur. Specify a start time in UTC and a duration in hours.

  5. To apply the changes immediately, select the Apply Immediately check box. Selecting this option can cause an outage in some cases; for more information on the impact of the Apply Immediately option, see Modifying an Amazon RDS DB Instance and Using the Apply Immediately Parameter.

  6. When all the changes are as you want them, choose Continue.

  7. On the confirmation page, review your changes. If they are correct, choose Modify DB Instance to save your changes.

    Alternatively, choose Back to edit your changes, or choose Cancel to cancel your changes.

CLI

To modify a MySQL DB instance, use the AWS CLI command modify-db-instance.

The following code modifies mysqldb by setting the backup retention period to 1 week (7 days) and disabling automatic minor version upgrades. These changes are applied during the next maintenance window.

Parameters

  • --db-instance-identifier — the name of the db instance

  • --backup-retention-period — the number of days to retain automatic backups.

  • --no-auto-minor-version-upgrade — disallow automatic minor version upgrades. To allow automatic minor version upgrades, use --auto-minor-version-upgrade.

  • --no-apply-immediately — apply changes during the next maintenance window. To apply changes immediately, use --apply-immediately.

For Linux, OS X, or Unix:

Copy
aws rds modify-db-instance \ --db-instance-identifier mysqldb \ --backup-retention-period 7 \ --no-auto-minor-version-upgrade \ --no-apply-immediately

For Windows:

Copy
aws rds modify-db-instance ^ --db-instance-identifier mysqldb ^ --backup-retention-period 7 ^ --no-auto-minor-version-upgrade ^ --no-apply-immediately

API

To modify a MySQL DB instance, use the ModifyDBInstance action.

Example

The following code modifies mysqldb by setting the backup retention period to 1 week (7 days) and disabling automatic minor version upgrades. These changes are applied during the next maintenance window.

Parameters

  • DBInstanceIdentifier — the name of the db instance

  • BackupRetentionPeriod — the number of days to retain automatic backups.

  • AutoMinorVersionUpgrade=false — disallow automatic minor version upgrades. To allow automatic minor version upgrades, set the value to true.

  • ApplyImmediately=false — apply changes during the next maintenance window. To apply changes immediately, set the value to true.

Copy
https://rds.us-east-1.amazonaws.com/ ?Action=ModifyDBInstance &ApplyImmediately=false &AutoMinorVersionUpgrade=false &BackupRetentionPeriod=7 &DBInstanceIdentifier=mydbinstance &SignatureMethod=HmacSHA256 &SignatureVersion=4 &Version=2013-09-09 &X-Amz-Algorithm=AWS4-HMAC-SHA256 &X-Amz-Credential=AKIADQKE4SARGYLE/20131016/us-east-1/rds/aws4_request &X-Amz-Date=20131016T233051Z &X-Amz-SignedHeaders=content-type;host;user-agent;x-amz-content-sha256;x-amz-date &X-Amz-Signature=087a8eb41cb1ab0fc9ec1575f23e73757ffc6a1e42d7d2b30b9cc0be988cff97