Purpose
This statement is used to start an OceanBase cluster.
This command needs to be executed only when OceanBase Database is started for the first time. Each cluster can execute this command only once. If the command fails, you cannot re-execute it. Instead, you need to rebuild the OceanBase cluster.
Before executing this command, make sure that the specified OBServer nodes have been started.
Syntax
ALTER SYSTEM BOOTSTRAP
server_info_list [shared_storage_info]
server_info_list:
server_info [, server_info]...
server_info:
[REGION=region] ZONE=zone SERVER=ip:port
shared_storage_info:
, SHARED_STORAGE_INFO = 'string_value'
Parameters
Parameter |
Description |
|---|---|
| REGION | The geographical region where the database server is located. Optional. |
| ZONE | The availability zone where the database server is located. Required. |
| SERVER | The IP address and port number of the database server. Required. The format is 'IP:PORT'. |
| shared_storage_info | The initial object storage information specified for each zone when the cluster is started. String type. The string includes the bucket name of the object storage and several sub-parameters of the object storage information, separated by ?. The sub-parameters are separated by &. Optional. Multiple server_info entries are separated by commas. |
Examples
Specify the list of Root Service servers and start the cluster. If the list contains multiple OBServer nodes, separate them with commas (,).
obclient> ALTER SYSTEM BOOTSTRAP ZONE 'zone1' SERVER 'xxx.xxx.xx.xx1:xxxx', ZONE 'zone2' SERVER 'xxx.xxx.xx.xx2:xxxx', ZONE 'zone3' SERVER 'xxx.xxx.xx.xx3:xxxx';
obclient> ALTER SYSTEM BOOTSTRAP
REGION='hangzhou' ZONE='zone1' SERVER='xxx.xxx.xxx.10:2882';
obclient> ALTER SYSTEM BOOTSTRAP
ZONE 'z1' SERVER 'xxx.xxx.xxx.xxx:26603',
ZONE 'z2' SERVER 'xxx.xxx.xxx.xxx:26605',
ZONE 'z3' SERVER 'xxx.xxx.xxx.xxx:26607',
SHARED_STORAGE_INFO "oss://cn-hangzhou-bucket-1?host=oss-cn-hangzhou-internal.aliyuncs.com&access_id=xxx&access_key=xxx&max_iops=10000&max_bandwidth=1GB";
The preceding examples show how to initialize a single-node and multi-node OceanBase cluster. When executing the command, replace the parameter values with the actual configuration information.
