Purpose
You can use this statement to start an OceanBase cluster.
This statement is required only when OceanBase Database is started for the first time. This statement can be executed only once on each cluster. If the statement fails, you need to re-create an OceanBase cluster to execute the statement again.
Before you execute this statement, make sure that all the specified OBServer nodes have been started properly.
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 | (Optional) The geographic region where the database server is located. |
| ZONE | (Required) The zone to which the database server belongs. |
| SERVER | (Required) The IP address and port number of the database server. Format: 'IP:PORT'. |
| shared_storage_info | The initial object storage information specified for each zone in the cluster when the cluster is started. The string value consists of the object storage bucket name and several subparameters of object storage information, separated by ?. The subparameters are separated by &. Optional. Separate multiple server_info parameters with commas (,). |
Examples
Specify a RootService server list and start the cluster. If the RootService server list contains more than one OBServer nodes, use commas (,) to separate them.
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 or multi-node OceanBase cluster. Replace the parameter values in the examples with actual configuration information.