Start obshell
You can use the following syntax to start OceanBase Shell (obshell):
${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 specifies 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, including the default value 1, indicate to take over. |
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 use the following syntax to stop obshell:
${home_path}/bin/obshell agent stop
Here is an example:
[admin@test001 ~]$ /home/admin/oceanbase/bin/obshell agent stop
Here, home_path specifies the installation directory of OceanBase Database. By default, obshell is installed in the bin directory under the installation directory of OceanBase Database.