Skip to content
Docs

Databases on Tanzahost

MySQL, MariaDB, PostgreSQL and Valkey next to your apps, private to your project, with connection details added to your app for you and backups 5 days a week.

Updated 22 Oct 20264 min read

A project can have MySQL, MariaDB, PostgreSQL and Valkey databases. Each one runs in the same location as your apps, only your project's apps can reach it unless you open it to your own tools, and its connection details are added to your app's variables for you. You don't type a host or a password anywhere. Your project's databases are backed up with it every day.

What you can add

TypeVersion todayGood for
MySQL8.4Laravel, WordPress and most PHP apps
MariaDB11.8Apps that ask for MariaDB; it works like MySQL
PostgreSQL18Django, Rails, Node.js apps, and Laravel too. Connection pooling is on
Valkey9.2A cache, sessions and queues

The Add dialog shows the version each new database gets. Valkey is the free, open copy of Redis, so apps and libraries written for Redis work with it. There's no hosted MongoDB.

Shared or its own

A MySQL database can be shared or have its own memory and processor. Every other type always has its own.

Shared MySQLIts own
TypesMySQL onlyMySQL, MariaDB, PostgreSQL, Valkey
How you payreading today's pricesThe memory and processor it really uses, every hour
LimitsNone to setMemory and processor limits you choose
Fair useUp to 30 connections, and a query is stopped after 30 secondsNone
Best forSmall sites, a WordPress blog, trying things outBusy shops, apps that need speed you can count on

An own database works like an app: it pays for the memory and processor time it really uses, measured every minute and charged from your wallet every hour (see How billing worksreading today's prices

Asha adds a database to duka

Asha's Laravel shop runs in her project duka, in UK-01 · United Kingdom. Her app is called web.

  1. She opens duka's Overview, and under Add a service she chooses Database.

  2. She picks MySQL, then Its own, and leaves the sliders at 512 MB of memory and half a processor. The dialog shows the price estimate before she adds anything.

  3. The name is filled in as mysql. She keeps it.

  4. Add its connection details to web's variables is ticked. She chooses Add mysql.

It takes about a minute. Then web has DB_HOST, DB_DATABASE, DB_PASSWORD and the rest as variables, and redeploys with them without downtime. Laravel connects with nothing typed by hand. Her database is reached at mysql.duka.internal, inside duka only.

Who can reach it

A database can only be reached from its own project's apps, and from the dashboard's own tools. An app in another project can't connect to it, even with the right password. Use the database's own page to browse tables and run queries, or the terminal of an app in the same project.

To use a tool on your own computer, like TablePlus or DBeaver, switch on Connections from outside on an own database's page. It's off until you do. The database then gets an address of ours, like db-7h3k2q.tanzahost.co, and a port of its own; only encrypted connections get through, and you can allow only your own addresses. A shared MySQL can't be opened. See Connect from your own computer.

What each database's page has

Open a database from the project's Overview to see:

  • Connect: the host, port, database, user and password, and which apps have them as variables.

  • Usage: memory and processor against its limits, what it stores, connections right now, and slow queries in the last 24 hours (queries that took more than a second).

  • Tables: its tables, their rows and size. Open one to see rows, change them or run a query.

  • Import and export: bring in a .sql file, or download a copy. See Import and export.

  • Users: extra users with their own passwords. See Users and passwords.

  • Connections from outside, for an own database: off until you switch it on. See Connect from your own computer.

  • Backups: it's backed up with the rest of the project, 5 days a week. See Backups and restore.

How many you can have

  • 20 databases in one project.

  • 20 own databases and 10 shared ones in one account.

Limits and memory

An own database's limits change while it runs, with Change limits. The lowest memory a database may have is 512 MB for MySQL and MariaDB, 256 MB for PostgreSQL and 64 MB for Valkey. More memory takes effect at once. Less memory restarts the database, which takes a few seconds. When a database uses 90% of its memory for 5 minutes, we tell you, at most once a day, with a button to raise the limit.

Updates

When a new build of the same version comes out, the database's page says so. Choose Update now, or Plan for a quiet hour. A copy of the data is kept first; if the database doesn't start within 5 minutes, it goes back by itself. You can Roll back for 7 days after an update. A new major version, like PostgreSQL 18 to 19, is a new database and an import.