Skip to main content
Version: 5.0.0

Database

Database is the core component of an application, Sealos provides a database cluster deployment management tool, can help you quickly deploy database clusters. It supports MySQL, PostgreSQL, MongoDB, Redis, Kafka, and more. Currently the database supports the following features.

  • Elastic expansion
  • Support multi-version and multi-type databases
  • Database connection: one-click connection, external network access
  • Database connection: manual backup, automatic backup
  • Database monitoring: resource, status, and performance monitoring
  • Database migration: public network migration and file migration
  • Database high availability: Supports multiple database instances
  • Visual database management: Create, delete, update, pause, restart the database

Quick start

Deploy and access a PostgreSQL database in just 6 steps.

1、Open Sealos desktop and click Database.

start_1

2、Click on the creation of a new cluster.

start_2

3、Select the corresponding database and parameters.

start_3

4、Click on deployment.

start_4

5、Enter DB to view details.

start_5

6、Database details.

start_6

start_7

start_8

start_9

start_10

start_11

start_12

Database connection

One-click connection

1、Enter database, click Connect.

connect_1

2、Manipulate the database at the terminal.

connect_2

Extranet access

1、Enter database, click Connect.

connect_3

2、Confirm open database.

connect_4

3、Copy the database connection information.

connect_5

4、Connect to the database in the Database Connection tool.

connect_6

connect_7

Database backup

Manual backup

1、Enter the database backup page, click Backup.

backup_1

2、Enter the backup information to start the backup.

backup_2

3、Check Backup status.

backup_3

backup_4

Automatic backup

1、Enter the database backup page, click Backup.

backup_5

2、Enable automatic backup and enter backup information.

backup_6

Database migration

This section uses the MySQL database as an example to describe how to migrate a database.

Public network migration

Public network migration involves two databases: the source database and the target database. The source database is the data source for migration, and the target database is the data destination for migration. The following introduction demonstrates the local database as the source database.

1、Enter the target database and connect to the target database.

migration_1

2、Create the corresponding database in the terminal interface. (skip this step if the corresponding database already exists)

migration_2

# Example of creating a database sql statement:
$ create database testmysql;

3、Enter the public network migration page of the target database, click the Migrate button.

migration_3

4、View migration configuration information.

migration_4

Copy the migration configuration information as follows.

# Example of an sql statement for setting configuration information:
$ set global binlog_format=ROW;
$ set binlog_row_image ='FULL';

5、Set the configuration information in the source database (MySQL and Postgres require manual configuration information, Mongo does not require configuration).

# xample of an sql statement for setting configuration information:
$ set global binlog_format=ROW;
$ set binlog_row_image ='FULL';

migration_5

6、Enter the target database, fill in the migration information of the source database, which tables to migrate, and fill in which database in the target database to migrate.

migration_6

If you need to continuously migrate data from the source database, enable continuous migration in the advanced configuration as follows.

migration_7

7、View migration task information.

migration_8

8、Enter the target database, connect to the target database, and check whether the migration data is complete.

migration_9

File migration

1、Enter the target database and connect to the target database.

migration_10

2、Create the corresponding database in the terminal interface. (skip this step if the corresponding database already exists)

# Example of creating a database sql statement:
$ create database testmysql;

migration_11

3、Upload the migration file, enter the database name, and start the migration.

migration_12

4、File migrating, Wait for the migration result.

migration_13

migration_14

5、Connect to the database to check whether the migrated data is complete.

migration_15