Something went wrong
IBM Cloud Databases CLI
Get started with CLI on your local terminal
You will need some installations so you can access all the features of IBM Cloud Databases
IBM Cloud CLI installed and initialized
Make sure that you downloaded, installed, and initialized the IBM Cloud CLI.
Install the IBM Cloud Databases plug-in
The Cloud Databases CLI plug-in offers extra methods of accessing the capabilities of the Cloud Databases services. The plug-in enables you to manage your deployment from the command line, but does not allow you to interact with the underlying database.
$ ibmcloud plugin install cloud-databases
Install external database management plug-in
To enable full management and use of your underlying database via the CLI, you need to install an external database management plug-in. If the external plugin is needed for connection via the Cloud Databases CLI plugin then it will be labelled as required.
Provision a database in just a few simple steps
Make sure you have the IBM Cloud CLI installed on your local terminal
Log in to IBM Cloud
$ ibmcloud login
Choose resource group
$ ibmcloud target -g <RESOURCE_GROUP>
$ ibmcloud target -g default
Provision the Databases instance
$ ibmcloud resource service-instance-create <INSTANCE_NAME> databases-for-postgresql <SERVICE_PLAN_NAME> <LOCATION> <PARAMETERS> <SERVICE_ENDPOINTS>
$ ibmcloud resource service-instance-create MyDatabase databases-for-postgresql standard us-south -p '{"members_host_flavor":"multitenant", "members_memory_allocation_mb": "8192"}' --service-endpoints="public"
Connect to your instance easily
Make sure you have an active instance in your account
Set the admin password
$ ibmcloud cdb deployment-user-password <INSTANCE_NAME> admin <PASSWORD>
$ ibmcloud cdb deployment-user-password MyDatabase admin abcd12345678
Connect to the database instance
$ ibmcloud cdb cxn <INSTANCE_NAME> --s
$ ibmcloud cdb cxn MyDatabase --s