MySQL — Economy
Databases in the Economy tier run in a logically separated tenant on a shared, multi-tenant environment managed by Nine. This makes them a perfect fit for non-production or low-traffic sites. Due to their fast startup time, they are also ideal for automated testing pipelines.
The Economy tier provides a single database, whereas the Business tier offers a dedicated database instance where you can create and manage multiple databases.
The following table gives an overview of the differences between the tiers:
| Tier | Economy (Beta) Single Databases | Business Dedicated Instances | First Managed Service |
|---|---|---|---|
| Manageable in Cockpit / nctl | ☑️ | ☑️ | ✖️ |
| Backups | ☑️ | ☑️ | ☑️ |
| Dedicated Resources | ✖️ | ☑️ | ☑️ |
| Custom Configuration | ✖️ | Limited options | ☑️ |
| Cluster Deployments | ✖️ | ✖️ | ☑️ |
| Starts at | Please reach out to: |
All On-Demand database tiers are backed by Nine's years of experience operating Managed Services and built on the same infrastructure and building blocks. The Economy and Business tiers make this expertise available as a self-service offering, tailored to different needs and budgets, from lightweight single databases to fully dedicated instances. Billing is automated based on the resources used.
Getting Started
You can use nctl or Cockpit, our web interface to get started:
- Cockpit
- nctl
- Create a New Service directly in Cockpit to get started.
- Retrieve the credentials from the overview page. Note the FQDN, username and password.
The database will have the same name as the user. - Connect to the newly created database:
mysql --user=${USER} --host=${FQDN} --password=${PASSWORD} --database=${USER} # database has the same name as the user
- Ensure you are logged in with
nctl:nctl auth login - Create a
mysqldatabase:nctl create mysqldatabase my-test-database - Connect to the newly created database:
nctl get mysqldatabase my-test-database # note the FQDN
nctl get mysqldatabase my-test-database --print-user # note the user
nctl get mysqldatabase my-test-database --print-password # note the password
mysql --user=${USER} --host=${FQDN} --password=${PASSWORD} --database=${USER} # database has the same name as the user
On-Demand databases can be managed via Cockpit, our command-line tool nctl or by directly using the API.
Billing is automated based on the resources used. Nine's automated management ensures the smooth operation of the service.
On-Demand databases offer limited configuration options. If more extensive settings are required, use our Managed Service.
Updates and Maintenance Windows
Security and software updates are generally performed during the maintenance window.
Therefore, short service interruptions may occur during this maintenance window without prior notice.
Monitoring
Nine monitors your database with a monitoring system 24x7. In the event of a malfunction, an (on-call) technician from Nine is automatically alerted and restores proper operation as quickly as possible.
Full utilization of resources is not assessed as a malfunction, as the size of the instance can be increased or decreased at any time.
Configuration Options
On-Demand Services come with a sensible base configuration that is suitable for most setups. They also provide the ability to change certain configuration options. Adjusting these configuration options can result in a restart of the instance.
The instance can be customized with the following configuration options:
Name
The name of the instance can be freely chosen, but must be unique. Once created, the name cannot be changed.
Location
Depending on available resources, instances can be created in these locations:
| API / Cockpit Name | Name | Location | Notes |
|---|---|---|---|
| nine-cz42 | ColoZüri 4.2 | Altstetten, Zürich | |
| nine-es34 | NTT Zürich 1 | Rümlang | |
| nine-cz41 | ColoZüri 4.1 | Altstetten, Zürich | New resources cannot be created in this location. |
The location cannot be changed after the resource was created.
Character Set
The charset is customizable. From experience, the default values utf8mb4_unicode_ci / utf8mb4 cover most needs.
Before considering customizing these values, please consult the MySQL documentation under Character Sets and Collations in MySQL.
Pricing
Databases are split into different packages:
| S | M | L | |
|---|---|---|---|
| Storage space max. | 1 GB | 5 GB | 10 GB |
| Max. Connections | 20 | 20 | 20 |
| Monthly fees |
The package is automatically selected based on the current database size. Storage is capped at 10 GB.
Connection
User
A user and password are generated, when the instance is created. Check the Getting Started section for details on how to retrieve the credentials.
TLS
The CA certificate will not match the hostname of the service. You may need to disable hostname verification explicitly.
The on-demand services only accept connections secured by TLS. Depending on the client or library used, it may be necessary to explicitly enable TLS.
The TLS certificate is self-signed. In addition to enabling TLS transport encryption, you may need to provide the certificate authority used for validation.
You can retrieve the CA either through Cockpit or nctl:
- Cockpit
- nctl
- Open the On-Demand Services overview and select the respective service.
- The CA is available under the resource's
Certificatetab.
- Ensure you are logged in with
nctl:nctl auth login - Retrieve the certificate:
nctl get mysqldatabase my-test-mysqldatabase --print-ca-cert
Importing an existing database
To quickly get up and running, you can import an existing database, for example from your local development environment. It is recommended to use the following options:
# create a dump of the database, ensure it does not contain the create database statement
mysqldump --opt --no-create-db my_mysqldatabase > my_mysqldatabase.sql
# import the dump into the newly created database
mysql --user={USER} --host={FQDN} --password={PASSWORD} --database={USER} < my_mysqldatabase.sql
Backups
Backups for the Economy tier are stored in S3-compatible object storage. They are created daily and can be downloaded using any S3-compatible client tool.
Downloading and Restoring a Backup
One-click restore is currently being worked on. In the meantime, backups can be downloaded and restored manually.
You can find the backup credentials and bucket details in Cockpit or via nctl.
Use s3cmd to list and download your backups:
# list available backups
s3cmd ls s3://backup-bucket/
# download the latest backup
s3cmd get s3://backup-bucket/dump.sql.zst ./dump.sql.zst
After downloading, you can restore the backup:
- MySQL
- PostgreSQL
zstd -d --stdout dump.sql.zst | mysql --user=${USER} --host=${FQDN} --password=${PASSWORD} --database=${USER}
zstd -d --stdout dump.sql.zst | psql --host=${FQDN} --username=${USER} --dbname=${USER}
For more S3 client tools and configuration options, see Object Storage Client Tools.
Storage
Storage is capped at 10 GB (L package). If your database requires more space, we recommend migrating to a Business tier database, which offers dedicated resources and automatic storage expansion. You can do this by downloading a backup and restoring it on a new Business tier instance.