Amazon Relational Database Service
User Guide (API Version 2012-01-15)
Print this pageEmail this pageGo to the ForumsView the PDFShare this page on TwitterShare this page on FacebookBookmark this page on DeliciousSubmit this page to RedditSubmit this page to DiggDid this page help you?  Yes  No   Tell us about it...

Working with DB Parameter Groups

A DB Parameter Group is initially created with the default parameters for the database engine used by the DB Instance. To provide custom values for any of the parameters, you must modify the group after creating it. Once you've created a DB Parameter Group, you need to associate it with your DB Instance. When you associate a new DB Parameter Group with a running DB Instance, you need to reboot the DB Instance for the new DB Parameter Group and associated settings to take effect.

In this example, you create, list, modify, and examine DB Parameter Groups.

[Caution]Caution

Improperly setting parameters in a DB Parameter Group can have unintended adverse effects, including degraded performance and system instability. Always exercise caution when modifying database parameters and back up your data before modifying your DB Parameter Group. You should try out parameter group changes on a test DB Instances, created using Point in Time Restores, before applying those parameter group changes to your production DB Instances.

[Note]Note

Some database engine parameters are constrained or disabled in the context of an RDS DB Instance. For more information, please see Engine-Specific Parameter Exceptions for RDS DB Instances.

Creating a DB Parameter Group

In this example, you create a new DB Parameter Group.

AWS Management Console

To create a DB Parameter Group

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

  2. Click DB Parameter Groups in the Navigation list on the left side of the window.

  3. Click the Create DB Parameter Group button.

    The Create DB Parameter Group window appears.

  4. Select a DB Parameter Group Family in the DB Parameter Group Family drop-down list box.

  5. Type the name of the new DB Parameter Group in the DB Parameter Group text box.

  6. Type a description for the new DB Parameter Group in the Description text box.

  7. Click the Yes, Create button.

CLI

To create a DB Parameter Group

  • Use the command rds-create-db-parameter-group with the following parameters:

    PROMPT>rds-create-db-parameter-group mydbparametergroup -f MySQL5.1 -d "My new parameter group"
    						

    This command should produce output similar to the following:

    DBPARAMETERGROUP  mydbparametergroup  mysql5.1  My new parameter group
    					

API

To create a DB Parameter Group

  • Call CreateDBParameterGroup with the following parameters:

    • DBParameterGroupName = mydbparamgroup

    • Description = "My new parameter group"

    • DBParameterGroupFamily = mysql5.1

    Example

    https://rds.amazonaws.com/
    	?Action=CreateDBParameterGroup
    	&DBParameterGroupName=mydbparametergroup
    	&Description=My%20new%20parameter%20group
    	&DBParameterGroupFamily=MySQL5.1
    	&Version=2012-01-15						
    	&SignatureVersion=2
    	&SignatureMethod=HmacSHA256
    	&Timestamp=2012-01-15T22%3A06%3A23.624Z
    	&AWSAccessKeyId=<AWS Access Key ID>
    	&Signature=<Signature>
    	

    This command should return a response similar to the following:

    <CreateDBParameterGroupResponse xmlns="http://rds.amazonaws.com/admin/2012-01-15/">
      <CreateDBParameterGroupResult>
        <DBParameterGroup>
          <DBParameterGroupFamily>mysql5.1</DBParameterGroupFamily>
          <Description>My new parameter group</Description>
          <DBParameterGroupName>mydbparametergroup</DBParameterGroupName>
        </DBParameterGroup>
      </CreateDBParameterGroupResult>
      <ResponseMetadata>
        <RequestId>700a8afe-0b81-11df-85f9-eb5c71b54ddc</RequestId>
      </ResponseMetadata>
    </CreateDBParameterGroupResponse>
    	

Listing Available DB Parameter Groups

You can see which DB Parameter Groups you've created for your AWS account by listing them.

[Note]Note

The default.mysql5.5 parameter group family is automatically created the first time you describe engine default parameters for the MySQL5.5 Parameter Group family or the first time you create a MySQL 5.5-based RDS DB Instance without specifying a custom MySQL 5.5 Parameter Group.

CLI

To list all available DB Parameter Groups for an AWS account

  • Use the command rds-describe-db-parameter-groups to list all available DB Parameter Groups for your AWS account:

    PROMPT>rds-describe-db-parameter-groups

    This command should produce output similar to the following:

    DBPARAMETERGROUP  default.mysql5.1     mysql5.1  Default parameter group for MySQL5.1
    DBPARAMETERGROUP  default.mysql5.5     mysql5.5  Default parameter group for MySQL5.5
    DBPARAMETERGROUP  mydbparametergroup   mysql5.5  My new parameter group
    
    					

AWS Management Console

To list all available DB Parameter Groups for an AWS account

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

  2. Click DB Parameter Groups in the Navigation list on the left side of the window.

    The available DB Parameter Groups appears in the My DB Parameter Groups list.

API

To list all available DB Parameter Groups for an AWS account

  • Call DescribeDBParameterGroups with no parameters.

    Example

    https://rds.amazonaws.com/
    	?Action=DescribeDBParameterGroups
    	&MaxRecords=100
    	&Version=2012-01-15
    	&SignatureVersion=2
    	&SignatureMethod=HmacSHA256
    	&Timestamp=2009-10-22T19%3A31%3A42.262Z
    	&AWSAccessKeyId=<AWS Access Key ID>
    	&Signature=<Signature>
    	

    This command should return a response similar to the following:

    <DescribeDBParameterGroupsResponse xmlns="http://rds.amazonaws.com/admin/2012-01-15/">
        <DescribeDBParameterGroupsResult>
            <DBParameterGroups>
                <DBParameterGroup>
                    <Engine>mysql5.1</Engine>
                    <Description>Default parameter group for MySQL5.1</Description>
                    <DBParameterGroupName>default.mysql5.1</DBParameterGroupName>
                </DBParameterGroup>
                <DBParameterGroup>
                    <Engine>mysql5.1</Engine>
                    <Description>My new parameter group</Description>
                    <DBParameterGroupName>mydbparametergroup</DBParameterGroupName>
                </DBParameterGroup>            
            </DBParameterGroups>
        </DescribeDBParameterGroupsResult>
        <ResponseMetadata>
            <RequestId>41731881-0b82-11df-9a9b-c1bd5894571c</RequestId>
        </ResponseMetadata>
    </DescribeDBParameterGroupsResponse>
    	

Viewing Parameter Values for a DB Parameter Group

You can get a detailed listing of all parameters in a DB Parameter Group and their values.

CLI

To view the parameter values for a specific DB Parameter Group

  • Use the command rds-describe-db-parameters to view the parameter values for a specific DB Parameter Group:

    PROMPT>rds-describe-db-parameters mydbparametergroup

    This command should produce output similar to the following (the following example has been truncated):

    DBPARAMETER  allow-suspicious-udfs
    engine-default  boolean  static   false
    DBPARAMETER  auto_increment_increment
    engine-default  integer  dynamic  true
    DBPARAMETER  auto_increment_offset
    engine-default  integer  dynamic  true
    (...sample truncated...)
    					

AWS Management Console

To view the parameter values for a specific DB Parameter Group

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

  2. Click DB Parameter Groups in the Navigation list on the left side of the window.

    The available DB Parameter Groups appear in the My DB Parameter Groups list.

  3. Select a DB Parameter Group from the My DB Parameter Groups list.

  4. Select the Parameters tab from the information panel at the bottom of the window.

    The list of parameters defined for the DB Parameter Group appears in this tab.

API

To view the parameter values for a specific DB Parameter Group

  • Call DescribeDBParameters with the following parameters:

    • DBParameterGroupName = mydbparametergroup

    Example

    					
    https://rds.amazonaws.com/
    	?Action=DescribeDBParameters
    	&DBParameterGroupName=mydbparametergroup
    	&MaxRecords=100
    	&Version=2012-01-15
    	&SignatureVersion=2
    	&SignatureMethod=HmacSHA256
    	&Timestamp=2009-10-22T19%3A31%3A42.262Z
    	&AWSAccessKeyId=<AWS Access Key ID>
    	&Signature=<Signature>
    							

    This command should return a response similar to the following (the following example has been truncated):

    	
    <DescribeDBParametersResponse xmlns="http://rds.amazonaws.com/admin/2012-01-15/">
      <DescribeDBParametersResult>
        <Marker>bWF4X3RtcF90YWJsZXM=</Marker>
        <Parameters>
          <Parameter>
            <DataType>boolean</DataType>
            <Source>engine-default</Source>
            <IsModifiable>false</IsModifiable>
            <Description>Controls whether user-defined functions that have only an xxx symbol for the main function can be loaded</Description>
            <ApplyType>static</ApplyType>
            <AllowedValues>0,1</AllowedValues>
            <ParameterName>allow-suspicious-udfs</ParameterName>
          </Parameter>
          <Parameter>
            <DataType>integer</DataType>
            <Source>engine-default</Source>
            <IsModifiable>true</IsModifiable>
            <Description>Intended for use with master-to-master replication, and can be used to control the operation of AUTO_INCREMENT columns</Description>
            <ApplyType>dynamic</ApplyType>
            <AllowedValues>1-65535</AllowedValues>
            <ParameterName>auto_increment_increment</ParameterName>
          </Parameter>
          <Parameter>
            <DataType>integer</DataType>
            <Source>engine-default</Source>
            <IsModifiable>true</IsModifiable>
            <Description>Determines the starting point for the AUTO_INCREMENT column value</Description>
            <ApplyType>dynamic</ApplyType>
            <AllowedValues>1-65535</AllowedValues>
            <ParameterName>auto_increment_offset</ParameterName>
          </Parameter>
     
          (... sample truncated...)
    
        </Parameters>
      </DescribeDBParametersResult>
      <ResponseMetadata>
        <RequestId>99c0937a-0b83-11df-85f9-eb5c71b54ddc</RequestId>
      </ResponseMetadata>
    </DescribeDBParametersResponse>
    					

Modifying a DB Parameter Group

You can modify parameters in a DB Parameter Group. These parameters are applied to DB Instances associated with the DB Parameter Group either immediately or on the next reboot of the DB Instance, depending on the parameter and the apply method of the parameter update.

[Note]Note

The immediately method can only be used for dynamic parameters; the pending-reboot method can be used for either dynamic or static parameters.

In this example, you modify a parameter in a DB Parameter Group.

CLI

To modify a DB Parameter Group

  • Use the command rds-modify-db-parameter-group to modify a DB Parameter Group.

    [Note]Note

    Amazon RDS does not support passing multiple comma-delimited parameter values for a single parameter.

    PROMPT>rds-modify-db-parameter-group mydbparametergroup --parameters "name=max_connections,value=250,method=immediate" --parameters "name=max_allowed_packet,value=1024,method=immediate" 
    						

    This command should produce output similar to the following:

    DBPARAMETERGROUP  mydbparametergroup
    					

AWS Management Console

To modify a DB Parameter Group

The AWS Console does not support this functionality. Please refer to the command line interface example.

API

To modify a DB Parameter Group

[Note]Note

Amazon RDS does not support passing multiple comma-delimited parameter values for a single parameter.

  • Call ModifyingDBParameterGroup with the following parameters:

    • DBParameterGroupName = mydbparametergroup

    • Parameters.member.1.ParameterName = max_allowed_packet

    • Parameters.member.1.ParameterValue = 1024

    • Parameters.member.1.ApplyMethod = immediate

    Example

    https://rds.amazonaws.com/
       ?Action=ModifyDBParameterGroup
       &DBParameterGroupName=mydbparametergroup
       &Parameters.member.1.ParameterName=max_allowed_packet
       &Parameters.member.1.ParameterValue=1024
       &Parameters.member.1.ApplyMethod=immediate
       &Version=2012-01-15   
       &SignatureVersion=2
       &SignatureMethod=HmacSHA256
       &Timestamp=2012-01-15T22%3A29%3A47.865Z   
    						   

    This command should return a response similar to the following:

    	
    <ModifyDBParameterGroupResponse xmlns="http://rds.amazonaws.com/admin/2012-01-15/">
      <ModifyDBParameterGroupResult>
        <DBParameterGroupName>mydbparametergroup</DBParameterGroupName>
      </ModifyDBParameterGroupResult>
      <ResponseMetadata>
        <RequestId>3b824e10-0b87-11df-972f-21e99bc6881d</RequestId>
      </ResponseMetadata>
    </ModifyDBParameterGroupResponse>
    					

Related Topics