search: keywords: ['console', 'command', 'connection', 'CONNECT']
Console - CONNECT ENV
(since v 3.2)
Connects the console to an OrientDB server or to an embedded environment.
Syntax
CONNECT ENV <env-url> [<user> <password>]
<env-url>
defines the URL of an OrientDB server/environment. It uses the format<mode>:<path>
<mode>
Defines the mode you want to use in connecting to the database. It can beplocal
orremote
.<path>
Defines the path to the database.
<user>
Defines the user you want to connect with.<password>
Defines the password needed to connect, with the defined user. User and password are needed to execute authenticated operations on the environment (eg. create a database on a remote server); they are not needed for operations that do not require an authentication or that require different credentials (eg. to open a database you can pass the database user and password, see OPEN)
After the console is connected to an environment, it allows to execute operations and Server-Level commands on it.
Examples:
-
Connect the console to a local (embedded) environment as the user
root
, loading it directly into the console:orientdb>
connect env plocal:../databases/
-
Connect to a remote server:
orientdb>
connect env remote:192.168.1.1 root root
For more information on other commands, see Console Commands.