The cm_admin adddbinfo utility adds database information (database name, UID, broker IP, borker port) to CM users.
cm_admin adddbinfo options cmuser-name database-name
options :
[{-u | --uid} userid]
[{-h | --host} broker-ip]
[{-p | --port} broker-port]
Option |
Description |
---|---|
-u |
Specifies the user ID of a database (default value : dba). |
-h |
Specifies the host of a broker used when client accesses a database (default value : localhost). |
-p |
Specifies the port number of a broker used when client accesses a database (default value : 30000). |
Adding database user ID (-u)
The following example shows how to add a database "testdb" and its user id "uid" to a CM user named "testcm".
cm_admin adddbinfo -u uid testcm testdb
Adding host IP of broker (-h)
The following example shows how to add a database "testdb" and its host IP "127.0.0.1" to a CM user named "testcm".
cm_admin adddbinfo -h 127.0.0.1 testcm testdb
Adding broker port (-u)
The following example shows how to add a database "testdb" and its broker port to "33000" to a CM user named "testcm".
cm_admin adddbinfo -p 33000 testcm testdb
Creating a default database
The following example shows how to add a default database "testdb" to a CM user named "testcm".
cm_admin adddbinfo testcm testdb