DLA supports Java Database Connectivity (JDBC) that is compatible with MySQL. You can use a MySQL CLI tool to connect to DLA through JDBC.
Prerequisites
The MySQL CLI supports MySQL 5.0 and later versions for DLA access.
mysql --version
mysql Ver 14.14 Distrib 5.6.38, for Linux (x86_64) using EditLine wrapper
You have created an endpoint to generate
Address:Port
. If not, create one by following the instructions provided in Create an endpoint.
Procedure
Connect to DLA without specifying a schema
mysql -h<end_point_host> -P<end_point_port> -u<user_name> -p<password> -c -A
Parameter description
end_point_host: the host address that is used to connect to DLA. For more information about how to obtain the host address, see View endpoint information in Create an endpoint.
end_point_port: the port number.
user_name: the name of the service account for DLA access.
password: the password of the service account for DLA access.
After you connect to DLA, you can run use <schema>
to switch to the corresponding schema.
Specify a schema to connect to DLA
mysql -h<end_point_host> -P<end_point_port> -u<user_name> -p<password> <schema> -c -A
After you connect to DLA, the page of the specified schema appears. You can run select database()
to view the schema information.