Logo
Usage

This chapter will introduce how to use DistSQL to manage resources and rules in a distributed database.

Introduction #

We will here use MySQL as example, but the same can be applicable to other databases.

  1. Start the MySQL service.
  2. Create to be registered MySQL databases.
  3. Create role and user in MySQL with creation permission for DBPlusEngine-Proxy.
  4. Start Zookeeper service.
  5. Add mode and authentication configurations to server.yaml.
  6. Start DBPlusEngine-Proxy.
  7. Use SDK or terminal connect to DBPlusEngine-Proxy.

Create Logic Database #

  1. Create logic database
CREATE DATABASE foo_db;
  1. Use newly created logic database
USE foo_db;

Resource Operation #

For more details please see concentrate rule examples.

Rule Operation #

For more details please see concentrate rule examples.

Notice #

  1. Currently, DROP DATABASE will only remove the logical distributed database, not the user’s actual database.
  2. DROP TABLE will delete all logical fragmented tables and actual tables in the database.
  3. CREATE DATABASE will only create a logical distributed database, so users need to create actual databases in advance.