Amazon Relational Database Service
User Guide (API Version 2013-02-12)
« PreviousNext »
View the PDF for this guide.Go to the AWS Discussion Forum for this product.Go to the Kindle Store to download this guide in Kindle format.Did this page help you?  Yes | No |  Tell us about it...

Working with DB Parameter Groups

What You Should Know About DB Parameter Groups

You manage the DB engine configuration through the use of DB parameter groups. DB parameter groups act as a container for engine configuration values that are applied to one or more DB instances. A default DB parameter group is used if you create a DB instance without specifying a DB parameter group. This default group contains database engine defaults and Amazon RDS system defaults based on the engine, compute class, and allocated storage of the instance. Note that not all DB engine parameters are available for modification in a DB parameter group.

If you want your DB instance to run a user-modified DB parameter group, you simply create a new DB parameter group, modify the desired parameters, and modify the DB instance to use the new DB parameter group. All DB instances that are members of a particular DB parameter group get all parameter updates to that DB parameter group.

Once you create a DB parameter group, you need to add your DB Instance as a member. When you add a running DB instance to a DB parameter group, you must reboot the DB instance for the new DB parameter group settings to take effect.

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 a DB parameter group. You should try out parameter group setting changes on a test DB instance before applying those parameter group changes to a production DB instance.

Note

Some MySQL parameters are constrained or disabled for a DB instance. For more information, please see MySQL 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 rds-create-db-parameter-group command. The following example creates a DB parameter group named mydbparametergroup for MySQL version 5.1 with a description of "My new parameter group."

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

    This command produces output similar to the following:

    DBPARAMETERGROUP  mydbparametergroup  mysql5.1  My new parameter group
    					

API

To create a DB parameter group

  • Call CreateDBParameterGroup. The following examples us creates a new parameter group named mydbparametergroup for MySQL version 5.1 and has the description "My new parameter group."

    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>
    	

    The command returns a response like 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 DB Parameter Groups

You can list the DB parameter groups you've created for your AWS account.

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 DB instance without specifying a custom MySQL 5.5 parameter group.

AWS Management Console

To list all 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 DB parameter groups appear in the My DB Parameter Groups list.

CLI

To list all DB parameter groups for an AWS account

  • Use the command rds-describe-db-parameter-groups command. The following example lists all available DB parameter groups for an AWS account.

    PROMPT>rds-describe-db-parameter-groups

    The command returns a response like 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
    
    					

API

To list all DB parameter groups for an AWS account

  • Call DescribeDBParameterGroups action. The following example returns a list of DB parameter groups.

    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>
    	

    The command returns a response like 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 list of all parameters in a DB parameter group and their values.

AWS Management Console

To view the parameter values for 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.

    The DB parameter groups appear in the My DB Parameter Groups list.

  3. Select a DB parameter group from the My DB Parameter Groups list.

    The list of parameters defined for the DB parameter group appears in the information panel. You can scroll through the parameters using the arrow keys at the top right of the information panel.

CLI

To view the parameter values for a DB parameter group

  • Use the rds-describe-db-parameters command. The following example lists the parameters and parameter values for a DB parameter group named mydbparametergroup.

    PROMPT>rds-describe-db-parameters mydbparametergroup

    The command returns a response like the following:

    DBPARAMETER  Parameter Name            Parameter Value  Source           Data Type  Apply Type  Is Modifiable
    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
    DBPARAMETER  binlog_cache_size         32768            system           integer    dynamic     true
    DBPARAMETER  socket                    /tmp/mysql.sock  system           string     static      false
    					

API

To view the parameter values for a DB Parameter Group

  • Call DescribeDBParameters action. The following example lists the parameters and parameter values for a DB parameter group named 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>
    							

    The command returns a response like the following:

    	
    <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 that are members of the DB parameter group either immediately or on the next reboot of the DB instance, depending on the type of the parameter (dynamic or static) and the apply method chosen for the parameter update.

DB Engine

Apply Immediately

Pending Reboot

MySQL

Dynamic

Dynamic and Static

Oracle

Dynamic

Dynamic and Static

SQL Server

Dynamic

Static only

AWS Management Console

To modify 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.

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

  3. In the My DB Parameter Groups list, select the parameter group you want to modify.

  4. In the information panel at the bottom of the window, select Edit Parameters.

  5. In the Edit Parameters dialog box, change the values of the parameters you want to modify. You can scroll through the parameters using the arrow keys at the top right of the dialog box.

    Note that you cannot change values in a default parameter group.

  6. Click Save Changes, then click Close in the confirmation dialog box.

CLI

To modify a DB parameter group

  • Use the rds-modify-db-parameter-group command. The following example modifies the max_connections and max_allowed_packet values in the DB parameter group named mydbparametergroup.

    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" 
    						

    The command produces output like the following:

    DBPARAMETERGROUP  mydbparametergroup
    					

API

To modify a DB parameter group

Note

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

  • Call the ModifyingDBParameterGroup action. The following example modifies the max_connections and max_allowed_packet values in the DB parameter group named mydbparametergroup.

    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   
    						   

    The command returns a response like 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>