Skip to content

MySQL Managed database

We are currently using a managed Databases with MySQL 8 on DigitalOcean. The credentials are in LastPass.

Access and Management

Visit DigitalOceans Database Dashboard to see all our Database cluster cluster

Cluster

Visit the Cluster dashboard to monitor and manage its behavior cluster management

Creating Users and Databases

New databases and users can be created through the UI

Add users and databases

Connection Details and Credentials

The credentials for a particular DB can be seen in the Cluster dashboardDB connection details

Currently, we are using username doadmin with the database dev_01 and the host db-mysql-nyc3-44656-do-user-950257-0.b.db.ondigitalocean.com on port 25060

Untested Migration feature

Digital ocean offers to create the migration for us. This feature is potentially very valuable but needs further evaluation . Migration Tool

Known problems

sql_require_primary_key

Our managed DigitalOcean DB has this MYSQL setting active default, enforcing that every table needs to have a primary key. This is a problem, since some of our Laravel migrations create tables using string or a uuid as primary keys. Those migrations will fail if we don't deactivate this setting temporarily

The current work-around within a troubled migration:

php
 /** @todo cleanup when not needed anymore */
 DB::statement('SET SESSION sql_require_primary_key=0');
 Schema::create('table_name', static function (Blueprint $table) {
            $table->string('id', 100)->primary();
            ...
        });
 DB::statement('SET SESSION sql_require_primary_key=1');