Using the MySQL Client to Connect to a Secure Doris Cluster
You can enable HTTPS to encrypt data transmission. This section describes how to enable HTTPS for a Doris cluster.
Procedure
- Log in to the CloudTable console.
- Select a region in the upper left corner.
- Click Buy Cluster in the upper right corner.
- Check whether Enable Https (which is toggled on by default) is toggled on after completing other configurations.
- Complete the parameter setting and click Next.
- Confirm the cluster specification order information on the displayed page and submit the order. After the cluster is created, go to its details page to view the channel status.
Downloading Security Certificates
- Click the name of the target security cluster to download the certificates on its details page.
- Specify the path for storing the certificates.
- Execute the sample SQL statement through HTTPS.curl -X POST -H 'Content-Type: text/plain' --cacert {path}/certificate.crt -uadmin https://host:port/api/query_schema/internal/test_db -d@1.sql
Parameter description:
- certificate.crt indicates the downloaded certificate.
- -uadmin indicates the username of the cluster. The default value is admin.
- host indicates the private IP address and port indicates the HTTPS port.
- test_db indicates the database name.
- 1. sql indicates file to which SQL statements are written.
- path indicates the path for storing certificates.
Connecting to a Doris Cluster
- Click the name of the target security cluster to download the certificates on its details page.
- Specify the path for storing the certificates.
- Connect to the cluster../mysql -uadmin -hCluster private IP address -PPort --ssl-ca={path}/certificate.crt --ssl-mode=VERIFY_CA -p Password
- Cluster private IP address: private IP address of the cluster to be connected
- path: path for storing certificates.
- Port: MySQL server port 9030 on the FE node
- Password: password set during cluster creation
- {path}/certificate.crt: path for storing the downloaded certificateNote
Use a MySQL 8.0 or later client after HTTPS is enabled.
Parent topic: Connecting to a Doris Cluster
- Procedure
- Downloading Security Certificates
- Connecting to a Doris Cluster