Start OBShell
You can start OceanBase Shell (OBShell) by running the following command:
${home_path}/bin/obshell agent start [--ip] [-P] [--takeover]
Here is an example:
[admin@test001 ~]$ /home/admin/oceanbase/bin/obshell agent start --ip 10.10.10.1 -P 2886
Here, home_path is the installation directory of OceanBase Database. By default, OBShell is installed in the bin directory under the installation directory of OceanBase Database.
The following table describes the options in the command.
| Option | Required? | Data type | Default value | Description |
|---|---|---|---|---|
| --ip | No | String | N/A | The IP address of OBShell. |
| -P/--port | No | Integer | 2886 | The port number of OBShell. |
| --takeover | No | Integer | 1 | Specifies whether to take over the OceanBase cluster. The value 0 indicates not to take over, and other values indicate to take over. The default value is 1. |
Notice
- If you have not started the OceanBase cluster before you start OBShell for the first time, you must specify the IP address. The port number is optional.
- If you have started the OceanBase cluster before you start OBShell for the first time, you can specify to take over the OceanBase cluster. For more information, see Take over an OceanBase cluster not deployed by OBShell.
- If you have started OBShell, both the IP address and port number are optional.
Stop OBShell
You can stop OBShell by running the following command:
${home_path}/bin/obshell agent stop
Here is an example:
[admin@test001 ~]$ /home/admin/oceanbase/bin/obshell agent stop
Here, home_path is the installation directory of OceanBase Database. By default, OBShell is installed in the bin directory under the installation directory of OceanBase Database.