Connection Method | Description |
Connecting to a cluster via DMC is easy. DMC provides database management services that integrate database/table-level operations, real-time monitoring, instance session management, SQL window, and data management. Note: Only the new version of DMC supports accessing read-only analysis engines. For the login address of the new version of DMC, go to the login page. | |
Developers using Linux CVM instances can use this connection method. | |
Developers using Windows CVM instances can use this connection method. |
/* to server instance ID */ syntax in Hint Syntax Usage./*to ap*/ Hint syntax. If there are multiple read-only analysis engine instances, load balancing will be performed for SQL statements according to the weight of read-only analysis engines./*to server instance ID*/ syntax does not exist or the read-only analysis engine does not exist, the SQL statement will be forwarded to an existing read-only instance or read-write instance in the current database proxy for execution by default./*to ap*/ syntax does not exist or the read-only analysis engine does not exist, the SQL statement will be forwarded to an existing read-only instance or read-write instance in the current database proxy for execution by default./*to ap*/ syntax does not exist or the read-only analysis engine does not exist, you need to use the "Analysis Engine Fault Forwarding" configuration item of the database proxy. After this configuration is enabled, when the read-only analysis engine fails, SQL statements that should have been forwarded to the read-only analysis engine will be forwarded to a read-only instance or a read-write instance for execution. Otherwise, the SQL statements will not be forwarded to other instances and an error will be reported.# mysql -h172.16.0.12 -P3306 -utest -p -c -Amysql> /* to server libradb-ins-hw0af2zi */ show databases;+---------------------+| Database |+---------------------+| INFORMATION_SCHEMA || Test1 || Test2 || __cdb_recycle_bin__ || haha || libra_system || test |+---------------------+7 rows in set (0.01 sec)
/*to ap*/ syntax is supported in version 1.4.4 and later.mysql> select /* to ap */ * from haha.t;+----+------+| id | haha |+----+------+| 1 | 1 || 2 | 2 |+----+------+2 rows in set (0.01 sec)
mysql> select /* to server libradb-ins-hw0af2zi */ * from haha.t;+----+------+| id | haha |+----+------+| 1 | 1 || 2 | 2 |+----+------+2 rows in set (0.01 sec)
mysql> select /* to server libradb-ins-hw0af2zi */ /*+ set_var(libra_enable_late_materialization=1) */ * from haha.t;+----+------+| id | haha |+----+------+| 1 | 1 || 2 | 2 |+----+------+2 rows in set (0.01 sec)
Was this page helpful?
You can also Contact sales or Submit a Ticket for help.
Help us improve! Rate your documentation experience in 5 mins.
Feedback