Skip to main content
CamposCloud runs MySQL, PostgreSQL, MongoDB and Redis databases. Each one is its own instance with its own memory, which is taken from the same plan as your applications. Every field is described in POST /v1/databases/create.

What each type needs

  • username: 3 to 32 letters, numbers or _, starting with a letter. Names reserved by the database, such as root or admin, are refused.
  • database: up to 63 letters, numbers or _, starting with a letter.
  • memoryMB: a JSON number (not a string), at least 512 MB by default, and it must fit in the memory left on your plan.
  • name: letters, numbers, spaces, _, . and -, starting with a letter or a number.
The password is never returned by the API. Store it when you create the database or when you change it.

Create it

Creating, changing and deleting databases share one limit of 1 request every 3 seconds. Starting, stopping and restarting share another, of 10 requests per minute. See the limits.

Wait until it is ready

The database starts as creating. Read it with GET /v1/databases/{databaseId} until it is active; only then does connection hold the address to use.

Connect your application

connection has the host and port to use, plus the username and the database. With the password you stored, the connection string is: Put the string in an environment variable of the application instead of in the code, and restart the application to apply it.
A password with characters such as @, : or / breaks the connection string unless it is URL encoded. Prefer a long password made of letters and numbers.

Changing it

When your plan ends, databases are turned off together with your applications and are deleted if the plan is not renewed.