Zum Hauptinhalt springen

Get a MySQL database

GET/v2/mysql-databases/{mysqlDatabaseId}/
v2
GET
database-get-mysql-database

Returns a MySQL database and its current status.

Request

  • mysqlDatabaseIdstring
    required

    ID of the MySQLDatabase to be retrieved.

Responses

application/json

OK

  • characterSettingsobject
    required
    • characterSetstring
      required

      A valid MySQL character set. Refer to the MySQL manual for more information and available character sets.

      You can also use the GET /v2/mysql-charsets endpoint to query available character sets for your MySQL database.

    • collationstring
      required

      A valid MySQL collation. Refer to the MySQL manual for more information and available collations.

      You can also use the GET /v2/mysql-charsets endpoint to query available character sets (and collations of these character sets) for your MySQL database.

  • createdAtstring (date-time)
    required
  • descriptionstring
    required

    A description of the MySQLDatabase. This is for your own reference and has no effect on the database itself.

  • externalHostnamestring
    required

    The hostname that you can use to connect to this MySQLDatabase from external sources, like your local machine or services running outside the mittwald cloud platform.

    Note that you still need a database user with externalAccess enabled to connect via this hostname.

  • finalizersarray of string (≥ 1 characters)
    • Array[
      • *string (≥ 1 characters)
      ]
  • hostnamestring
    required

    The hostname that you can use to connect to this MySQLDatabase from within the hosting environment.

  • idstring (uuid)
    required
  • isReadyboolean
    required
  • isSharedboolean
    required
  • mainUserobject
    • accessLevelstring (one of: full, readonly)
      required

      The access level that this MySQLUser should have for the database. The full access level grants the user read/write privileges on the database.

    • createdAtstring (date-time)
      required
    • databaseIdstring (uuid)
      required
    • descriptionstring
    • disabledboolean
      required
    • externalAccessboolean
      required

      Describes if users should be able to connection to this database from external sources. Defaults to false when not set.

      To find out how to connect to your database from external sources, refer to the externalHostname field of the GET /v2/mysql-databases/{id} endpoint.

    • idstring (uuid)
      required
    • mainUserboolean
      required

      Indicates whether this MySQL user is the main user of the database. The main user is created by default when a new MySQL database is provisioned. It can neither be deleted nor disabled, but its password can be updated.

    • namestring
      required

      The name of the MySQL user. This can be used as the username when connecting to the database.

    • passwordUpdatedAtstring (date-time)
      required
    • statusstring (one of: pending, ready, error, terminating, disabled)
      required
    • statusSetAtstring (date-time)
      required
    • updatedAtstring (date-time)
      required
  • namestring
    required

    The name of the MySQLDatabase. This is also the name of the database that you can use when connecting to it. It is automatically generated and cannot be changed.

  • projectIdstring (uuid)
    required
  • statusstring (one of: pending, ready, migrating, importing, error)
    required
  • statusSetAtstring (date-time)
    required
  • storageUsageInBytesinteger (int64)
    required
  • storageUsageInBytesSetAtstring (date-time)
    required
  • updatedAtstring (date-time)
    required
  • versionstring
    required

    The MySQL version that this database is running, in <major>.<minor> format. Use the GET /v2/mysql-versions endpoint to query available versions.

Usage examples

$ curl \
--fail \
--location \
-H "Authorization: Bearer $MITTWALD_API_TOKEN" \
https://api.mittwald.de/v2/mysql-databases/string