Managing Databases

Opalstack provides two varieties of managed database services:

  • MariaDB - a community-developed fork of the MySQL relational database management system.
  • PostgreSQL - an open-source object-relational database management system.

The control panel lets you manage databases and database servers for both of these database services.

Databases

Adding Databases

1

Click on Databases in the control panel sidebar.

The Databases section of the sidebar will expand to show more options.

2

Click on either MariaDB or PostgreSQL in the expanded sidebar.

3

Click the button labeled "+ Add Database" in the upper-left corner of the content area.

4

Click either the MariaDB tab or the PostgreSQL tab to select the type of database you want to install.

5

Enter the desired name for your new database in the Name field.

6

Select a database user for your new database.

You can select an existing database user or select the "Add user to opalN.opalstack.com" option to have a new database user created along with the database.

If you opt to add a new database user, the new user will have the same name as the database.

If you have multiple servers on your account, be sure to select (or create) the user on the correct server.

7

Select the desired character set for your database.

8

If you need to access your database from an external client, then toggle the External Access switch to its "on" state.

Note that this option is available only for MariaDB.

9

Click the "Add Database" button to save the new database.

10

A notice will appear on the screen to let you know the new database user's initial random password.

Make a note of the password.

If you missed the notice, you can access it via the Notices icon (a bell) near the top-right corner of the panel.

11

A second notice will appear when the database is ready for use.

Deleting Databases

1

Click on Databases in the control panel sidebar.

The Databases section of the sidebar will expand to show more options.

2

Click on either MariaDB or PostgreSQL in the expanded sidebar.

3

Select the database to be deleted by checking its checkbox in the leftmost column of the database list.

You can select multiple databases if you wish to delete more than one.

When you've selected one or more databases to be deleted, a button labeled "Delete Selected" will appear above the database list.

4

Click the "Delete Selected" button above the database list.

5

A confirmation dialog will appear.

Follow the instructions in the dialog by typing the phrase "I confirm" in the space provided.

After you have typed the phrase, a button labeled "Delete" will appear in the confirmation dialog.

6

Click the "Delete" button to queue the selected databases for deletion. The databases will be permanently deleted in 24 hours.

Once you have queued databases for deletion, two new icons will appear for those databases in the database list:

These icons can be used to undo or accelerate the deletion process:

  1. The Recover icon: click to remove your database from the deletion queue.
  2. The Delete Now icon: click to delete the database immediately.

Database Users

Adding Database Users

Database users can be created only when creating a database.

Changing a Database User's Password

1

Click on Databases in the control panel sidebar.

The Databases section of the sidebar will expand to show more options.

2

Click on either MariaDB Users or PostgreSQL Users in the expanded sidebar.

3

Select the database user to be deleted by checking its checkbox in the leftmost column of the database user list.

You can select multiple database users if you wish to delete more than one.

When you've selected one or more database users to be deleted, two buttons will appear above the database user list.

4

Click the "Change MariaDB User Passwords" or "Change PostgreSQL User Passwords" button as appropriate.

5

Enter the new database user password in the field labeled "Password".

Passwords must meet the following requirements:

  • Must contain at least 1 of each of the following:
    • 1 lowercase letter A-Z
    • 1 uppercase letter a-z
    • 1 numeral 0-9
    • 1 special character
  • Must be a minimum of 8 and a maximum of 32 characters in length for MariaDB users or 64 characters in length for PostgreSQL users.
6

Enter your new password again in the field labeled "Confirm".

When you've entered identical valid passwords in both fields, the field borders will turn green and a "Change Passwords" button will appear.

7

Click the "Change Passwords" button to save your new password. The password will be applied to all of the database users that were selected in step 3 above.

Deleting Database Users

1

Click on Databases in the control panel sidebar.

The Databases section of the sidebar will expand to show more options.

2

Click on either MariaDB Users or PostgreSQL Users in the expanded sidebar.

3

Select the database user to be deleted by checking its checkbox in the leftmost column of the database user list.

You can select multiple database users if you wish to delete more than one.

When you've selected one or more database users to be deleted, two buttons will appear above the database user list.

4

Click the "Delete Selected" button above the database user list.

5

A confirmation dialog will appear.

Follow the instructions in the dialog by typing the phrase "I confirm" in the space provided.

After you have typed the phrase, a button labeled "Delete" will appear in the confirmation dialog.

6

Click the "Delete" button to queue the selected database users for deletion. The database users will be permanently deleted in 24 hours.

Once you have queued database users for deletion, two new icons will appear for those database users in the database user list:

These icons can be used to undo or accelerate the deletion process:

  1. The Recover icon: click to remove your database user from the deletion queue.
  2. The Delete Now icon: click to delete the database user immediately.