Modify parameters
You can modify parameters to make seekdb behave as required by your business. Parameters are divided into dynamic and restart-effective parameters. You can use parameters to control the modules of seekdb.
For more information about parameters, see Parameter management.
Procedure
-
Log in to seekdb.
The following example shows how to connect to the database. Please replace the placeholders with your actual environment.
mysql -h127.xx.xx.xx -P2881 -uroot -p***** -A -
Execute the following command to view the value of a parameter.
Example:
SHOW PARAMETERS LIKE '%syslog_level%';The query result is as follows:
+--------------+-----------+-------+------------------------------------------------------------------------------------------------------------------------------+-------------------+---------------+-----------+
| name | data_type | value | info | edit_level | default_value | isdefault |
+--------------+-----------+-------+------------------------------------------------------------------------------------------------------------------------------+-------------------+---------------+-----------+
| syslog_level | STRING | ERROR | specifies the current level of logging. There are DEBUG, TRACE, WDIAG, EDIAG, INFO, WARN, ERROR, seven different log levels. | DYNAMIC_EFFECTIVE | ERROR | 1 |
+--------------+-----------+-------+------------------------------------------------------------------------------------------------------------------------------+-------------------+---------------+-----------+
1 row in setFor more information about how to view parameters, see View parameters.
-
Execute the following command to modify the value of a parameter.
The statement is as follows:
ALTER SYSTEM [SET] parameter_name = expressionThe following table describes the related parameters:
expressionspecifies the new value of the parameter.
seekdb saves the change in the instance's local store. A dynamic parameter takes effect immediately. A static parameter takes effect at the next startup.
The following examples show how to modify a parameter:
ALTER SYSTEM SET syslog_level='WARN';Set the maximum number of retained log files to 10.
ALTER SYSTEM SET max_syslog_file_count = 10; -
After the modification is successful, you can use the
SHOW PARAMETERSstatement to verify whether the value of the parameter has been modified. You can choose to restart seekdb or not, depending on your actual situation.SHOW PARAMETERS LIKE '%syslog_level%';The query result is as follows:
+--------------+-----------+-------+------------------------------------------------------------------------------------------------------------------------------+-------------------+---------------+-----------+
| name | data_type | value | info | edit_level | default_value | isdefault |
+--------------+-----------+-------+------------------------------------------------------------------------------------------------------------------------------+-------------------+---------------+-----------+
| syslog_level | STRING | WARN | specifies the current level of logging. There are DEBUG, TRACE, WDIAG, EDIAG, INFO, WARN, ERROR, seven different log levels. | DYNAMIC_EFFECTIVE | ERROR | 0 |
+--------------+-----------+-------+------------------------------------------------------------------------------------------------------------------------------+-------------------+---------------+-----------+
1 row in set