All Products
Search
Document Center

Migration Hub:StarRocks

Last Updated:Feb 13, 2026

Service account authorization

-- Create user (if not exists)
CREATE USER '<username>' IDENTIFIED BY '<password>';

-- Grant permissions on default_catalog
GRANT USAGE ON CATALOG default_catalog TO USER '<username>';
GRANT SELECT ON ALL TABLES IN DATABASE default_catalog.<your_db> TO USER '<username>';

-- Grant permissions on external catalogs, such as hive_catalog and iceberg_catalog
GRANT USAGE ON CATALOG hive_catalog TO USER '<username>';
GRANT SELECT ON ALL TABLES IN DATABASE <hive_catalog>.<your_db> TO USER '<username>';

-- Grant access to the statistics database
GRANT SELECT ON DATABASE _statistics_ TO USER '<username>';

Data source management

Option

Description

--jdbc-url

JDBC connection URL (Required)

--username

Username (Required)

--password

Password (Required)

lhm datasource set StarRocks -n sr1 \
    --jdbc-url jdbc:mysql://<host>:9030/<default> \
    --username <username> \
    --password '$DB_PASSWORD'