Skip to main content

MySQL 8

Oracle's MySQL, for applications and teams committed to it rather than to MariaDB

Oracle's MySQL rather than MariaDB. The same wire protocol and the same driver, so an application does not know the difference unless it is asking for something only one of them has.

Choose it where an application or a team is committed to MySQL itself — a feature that only exists there, a tool that refuses to run against anything else, or an operations team who know its behaviour under load. If neither applies, MariaDB is the default for a reason: it is what most of these sites run, and it is what this platform's own tooling is exercised against daily.

Like every database here it stays on the machine's own disk. See Storage for what can be moved onto a disk of its own.

#Versions

Version Status
8.0 Supported, and the default

Pin the version, not the build: name 8.0 and the platform matches it to the current build, so a security rebuild reaches you without anybody editing a repository.

The version you name is the one your environment runs from the next deploy. This service keeps data, and not every version can read another's — before you change it, read Changing a service's version.

#What you can change

In vallic.yaml — what each one does is on Service settings:

services:
  - mysql:
      version: '8.0'
      environment:
        MYSQL_MAX_ALLOWED_PACKET: …
        MYSQL_INNODB_BUFFER_POOL_SIZE: …
        MYSQL_MAX_CONNECTIONS: …
        MYSQL_SLOW_QUERY_LOG: …
        MYSQL_LONG_QUERY_TIME: …

Anything not on this list refuses the deploy, naming the variable — rather than being accepted and quietly ignored.

#Connecting to it

Read the environment rather than committing credentials. The same names as every other database:

DB_HOST      the service name
DB_PORT      3306
DB_DRIVER    mysql
DB_NAME
DB_USER
DB_PASSWORD

See Variables for the full list and settings.vallic.php for a Drupal site, which reads all of it for you.

#Backups

Dumped nightly with everything else, and restored the same way. Nothing about the backup schedule differs from MariaDB — see Backups.

Next

  • Storage — why the database is not offered a disk of its own
  • MariaDB — the default, and what you get if you say nothing