SQL Database (MySQL-compatible)

A relational database for existing apps. Works with your MySQL apps, drivers and tools.

Last updated

SQL Database is for existing apps and tools such as WordPress or Laravel. Works with your MySQL apps, drivers and tools: it speaks the MySQL client protocol. It is not MySQL and not feature-equivalent; JSON is stored as text with validation, and some functions, syntax and authentication plugins differ.

Note: SQL Database runs on DASTER's shared server in Mumbai. Its endpoint is reachable only from apps hosted on DASTER today; connecting from your own computer or another host is not available yet.

Create a database

  1. In your project, open Database in the sidebar and choose the MySQL-compatible database page.
  2. Choose New database and confirm. The page follows it until it is ready.
  3. Open Connect and choose Rotate password to get the password. It is shown once.

Connections require TLS (ssl-mode=REQUIRED).

Work with it

TabWhat you can do
OverviewStorage and sessions now, contents, backups and details
ConnectThe endpoint and login; Rotate password
TablesBrowse 50 rows per page; add, edit or delete one row by its primary key. Tables without a primary key are read-only here. Create tables from your app or a client.
Users & privilegesUp to 5 extra logins, read only or read and write; each password is shown once
Network accessUp to 20 address ranges
MetricsA reading of the current figures
Import & exportExport the first 1,000 rows of a table as JSON; import a JSON array of at most 500 rows and 1 MB into an existing table, all or nothing
BackupsVerified backups, Back up now and Restore
SettingsSuspend, Resume and Delete

Extra logins never get rights to change the schema or grant access. Backups pause access briefly and do not include views, stored routines, triggers or events. A restore keeps the database name, so your apps keep working with the same connection string; their open connections are closed once and reconnect to the restored data.

Apps hosted on DASTER in the same project get MYSQL_URL with TLS, next to DASTER_URL and DASTER_SERVER_KEY. Connections go through DASTER's TLS proxy at db.ap-south-1.daster.io, which checks the network access list against the client's address.

Note: Metrics history and alerts are not available yet.

With the API

The routes are the same as for Document Database, below /v1/projects/{projectId}/databases. Extra logins:

HTTP
POST /v1/projects/{projectId}/databases/{id}/users?organizationId={organizationId}
Content-Type: application/json

{ "label": "reporting", "privilege": "read_only", "confirmed": true }

privilege is read_only or read_write. Creating a login needs a sign-in within the last 10 minutes.