Databases with oxmysql
Point oxmysql at a BasiX database.
On this page
Managed MariaDB and PostgreSQL databases for your server. Create them in Dashboard → Databases.
- Host:
db.basix.media. Port3306(MariaDB) or5432(PostgreSQL). Connect with TLS: the connection string from the dashboard enables it. - The dashboard shows the user, password and a ready connection string.
- Database size counts toward your storage quota. Over quota, databases switch to read-only until you free space.
- In the dashboard you can restrict access to a list of IP addresses and cap connections and queries, import or export a SQL dump, and migrate from another server.
For oxmysql, put the connection string in server.cfg:
server.cfg
set mysql_connection_string "mysql://user:[email protected]:3306/dbname?ssl={}"Access rules through the API
GET or PATCH https://upload.basix.media/api/v1/databases/<id>/access. Needs a full key created by an owner or an admin of the team. The database id is shown in the dashboard URL (/dashboard/databases/<id>).
| Field | Meaning |
|---|---|
allowedIps | Up to 50 IPv4/IPv6 addresses or CIDR ranges. Empty list = open to any address. MariaDB accepts single IPv6 addresses only, no IPv6 ranges. |
maxConnections | Simultaneous connections, 1 to 1,000,000, or null for no limit. |
maxQueriesPerHour | MariaDB only. 1 to 1,000,000 or null. |
maxConnectionsPerHour | MariaDB only. 1 to 1,000,000 or null. |
curl
curl -X PATCH https://upload.basix.media/api/v1/databases/<id>/access \
-H "Authorization: Bearer $BASIX_FULL_KEY" -H "Content-Type: application/json" \
-d '{ "allowedIps": ["203.0.113.10", "198.51.100.0/24"], "maxConnections": 50 }'Both methods answer { "access": { "allowedIps": [...], "maxConnections": 50, "maxQueriesPerHour": null, "maxConnectionsPerHour": null } }. Fields you leave out keep their value. An invalid value answers 400 BAD_REQUEST with the reason.
Try it on your own server
Create a free account and your API key is ready in about two minutes. 3 GB included, bandwidth never billed, no card needed.