MySQL Configuration

MySQL parameters are used to customize rules for MySQL script migration.

Open the features-mysql.properties file in the config folder and configure Parameters in the features-mysql.properties file as required.

Table 1 Parameters in the features-mysql.properties file

Parameter

Description

Value Range

Default Value

Example

  • table.databaseAsSchema

  • table.defaultSchema

Whether to use a database name as the schema name. If a database name does not exist, the user-defined schema specified by table.schema will be used. If table.schema is not specified, the default schema will be used.

  • true

  • false

  • public

  • true

  • public

  • table.databaseAsSchema=true

  • table.defaultSchema=public

  • table.schema

Name of the user-defined schema. If this parameter is specified, it will be directly used. In this case, even if useDatabaseAsSchema is set to true, the name of the current schema will be used.

  • schemaName

  • null

  • table.schema=

  • table.orientation

Default data storage mode. Value ROW means row storage, and value COLUMN means column storage.

  • ROW

  • COLUMN

  • ROW

  • table.orientation=ROW

  • table.type

Default table type, which can be partitioned table, replication table, round-robin table, and hash table.

  • HASH

  • REPLICATION

  • ROUND-ROBIN

  • HASH

  • table.type=HASH

  • table.tablespace

Tablespace options

  • COMMENT

  • RESERVE

  • RESERVE

  • table.tablespace=RESERVE

  • table.partition-key.choose.strategy

Policy for selecting the partition key

  • partitionKeyChooserStrategy

  • partitionKeyChooserStrategy

  • table.partition-key.choose.strategy=partitionKeyChooserStrategy

  • table.partition-key.name

Partition key. If this parameter is not specified, the default selection policy will be used. If there are multiple columns, separate them with commas (,). The column names are case insensitive.

  • Reserved parameter

  • null

  • table.partition-key.name=

  • table.compress.mode

Compression mode. If keyword COMPRESS is specified in CREATE TABLE, the compression feature will be triggered in the case of bulk INSERT operations. If this feature is enabled, a scan will be performed on all tuple data within the page to generate a dictionary and then the tuple data will be compressed and stored. If NOCOMPRESS is used, tables will not be compressed.

  • COMPRESS

  • NOCOMPRESS

  • NOCOMPRESS

  • table.compress.mode=NOCOMPRESS

  • table.compress.row

  • table.compress.column

Compression level of table data. It determines the compression ratio and duration.

  • YES

  • NO

  • YES

  • NO

  • LOW

  • MIDDLE

  • HIGH

  • NO

  • LOW

  • table.compress.row=NO

  • table.compress.column=LOW

  • table.compress.level

Table data compression ratio and duration at the same compression level. This divides a compression level into sublevels, providing more choices for the compression ratio and duration. As the value becomes larger, the compression ratio becomes higher and duration longer at the same compression level.

  • 0

  • 1

  • 2

  • 3

  • 0

  • table.compress.level=0

  • table.database.template

Database template

  • Reserved parameter

  • template0

table.database.template=template0

  • table.database.encoding

A database code.

  • UTF8

  • SQL_ASCII

  • GBK

  • Latin1 codes

  • UTF8

table.database.encoding=UTF8

  • table.index.rename

Whether to rename an index when creating the index.

  • true

  • false

false

table.index.rename=false

  • table.database.onlyFullGroupBy

Whether all non-aggregation columns after SELECT are displayed in GROUP BY.

  • true

  • false

true

table.database.onlyFullGroupBy=true

  • table.database.realAsFloat

Used for converting the data type. The default value is false, indicating that the data type is converted to DOUBLE PRECISION. When the value is changed to true, the data type is converted to REAL.

  • true

  • false

false

table.database.realAsFloat=false