Command line
machbase-neo serve
Start machbase-neo server process.
Flags
flag (long) | flag (short) | desc |
---|---|---|
--host | listening network addr (default 127.0.0.1 )ex) --host 0.0.0.0 | |
--config | -c | config file location ex) --config /data/machbase-neo.conf |
--pid | file path to save pid ex) --pid /data/machbase-neo.pid | |
--data | path to database (default ./machbase_home )ex) --data /data/machbase | |
--file | path to files (default . )ex) --file /data/files | |
--preset | database preset auto , fog , edge (default auto )ex) --preset edge |
IMPORTANT
Since the default of --host
is the loopback address, it is not allowed to access machbase-neo from the remote hosts.
Set --host <host-address>
or --host 0.0.0.0
for accepting the network connections from remote clients.
If execute machbase-neo serve
with no flags,
$ machbase-neo serve
it is equivalent with
$ machbase-neo serve --host 127.0.0.1 --data ./machbase_home --file . --preset auto
machbase-neo shell
Start machbase-neo shell. It will start interactive mode shell if there are no other arguments.
Flags
flag (long) | desc | |
---|---|---|
-s , --server | machbase-neo’s gRPC address. default: --server tcp://127.0.0.1:5655 e.g. -s unix://./mach-grpc.sock | |
--user | user name. default: sys env: NEOSHELL_USER | Since v8.0.4 |
--password | password. default: manager env: NEOSHELL_PASSWORD | Since v8.0.4 |
When machbase-neo shell starts, it is looking for the user name and password from OS’s environment variables NEOSHELL_USER
and NEOSHELL_PASSWORD
. Then if the flags --user
and --password
are provided, it will override the provided values instead of the environment variables.
Precedence of username and password
Command line flags
If --user
, --password
is provided? Use the given values
Environment variables
If $NEOSHELL_USER
(on windows %NEOSHELL_USER%
) is set? Use the value as the user name.
If $NEOSHELL_PASSWORD
(on windows %NEOSHELL_PASSWORD%
) is set? Use the value as the password.
Default
None of those are provided? Use default value sys
and manager
.
Practical usage
For the security, use instant environment variables as below example.
$ NEOSHELL_PASSWORD='my-secret' machbase-neo shell --user sys
Be aware when you use --password
flag, the secret can be exposed by simple ps
command as like an example below.
$ machbase-neo shell --user sys --password manager
$ ps -aef |grep machbase-neo
501 13551 3598 0 9:33AM ttys000 0:00.07 machbase-neo shell --user sys --password manager
machbase-neo version
Show version and engine info.
machbase-neo gen-config
Prints out default config template.
$ machbase-neo gen-config ↵
define DEF {
LISTEN_HOST = flag("--host", "127.0.0.1")
SHELL_PORT = flag("--shell-port", "5652")
MQTT_PORT = flag("--mqtt-port", "5653")
HTTP_PORT = flag("--http-port", "5654")
GRPC_PORT = flag("--grpc-port", "5655")
......