MariaDB databases: console walkthrough¶
The same operations as the step-by-step guide, done in the console. See the overview for why the server belongs to your project.
This console page has a guided tour
Click Start the tour beside the create button for a walkthrough that highlights each field as you go.
List¶
WebHosting > Databases > MariaDB lists the databases in the selected project.
The Simple and Advanced views, the tour and the create button all sit on the page header, above the list.
The Server column names the MariaDB in your project that holds each database. Ready reports whether the server actually has it, rather than whether the object exists.
The page is project-scoped. While the project selector reads All Projects the create button is hidden.
Advanced hands off to the operator's own view, which shows every kind the MariaDB operator provides rather than the subset this page covers.
Create¶
Create MariaDB opens a guided form.
Configure via switches the same submission between the form and the YAML it produces.
MariaDB Server¶
The servers in your project, plus a Create new ... entry.
A project that already has a server starts on it, and one server is enough for many databases. There is rarely a reason to add a second.
A project with none starts on Create new ..., which reveals a name and a storage size. The defaults are fine for a first database. The disk can be grown later but never shrunk.
The server is created in your own namespace
It is the server your project owns, created in your namespace when you save. There is no shared server to attach to instead.
Database name¶
Checked against the databases already in your project, so a clash is reported before you submit rather than after.
Database User¶
The login your application connects as. It fills in from the database name with a -user
suffix as you type, and stops following once you type your own. It is checked against the
users your project already has.
The password is generated, not typed
It is never shown on screen. It goes into a Secret named after the database, together with the host, port and database name, and your workload should read it from there rather than carrying a copy.
This user has all privileges on its own database and nothing on any other. Root is separate, created once with the server, and is deliberately not offered here.
The character set and collation are not asked for: the database is created as utf8mb4
with utf8mb4_unicode_ci. Use the YAML view or the CLI if you need something else.
Use the YAML view toggle to see the Database object the form will submit. The server, the user, the grant and the Secrets come from Templates, so the YAML view shows the database rather than the whole set.
Change¶
The console form creates; it does not edit. Growing the server's disk and adding further databases are in Change.
The database name, its server, its character set and its collation cannot be changed after creation.
Delete¶
Use the kebab menu at the end of the row.
Deleting the database object does not drop the database
The object is created with cleanupPolicy: Skip, so the data stays on the server. See
Delete for how to drop it when you mean to, and for the user, grant
and Secret that do not go with it either.
Where the console differs from the CLI¶
| Console | oc |
|
|---|---|---|
| Missing server | Create new ..., in the same submit | Run the server template first |
| Storage size | Offered only when creating a server | -p STORAGE_SIZE on the server template |
| Database user | Prefilled from the database name | -p DB_USER, your choice |
| Character set and collation | Fixed at utf8mb4 |
-p CHARACTER_SET, -p COLLATE |
| Passwords | Generated, never shown | Generated by the template |
| Name clashes | Checked as you type | Reported by the operator after apply |
Ambiguous Database kind |
Not a concern - the page targets one kind | Use databases.k8s.mariadb.com |