Console - CONNECT
Opens a database.
Syntax
CONNECT <database-url> <user> <password>
<database-url>
Defines the URL of the database you want to connect to. 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 to the database with.<password>
Defines the password needed to connect to the database, with the defined user.
Examples:
Connect to a local database as the user
admin
, loading it directly into the console:- orientdb>
CONNECT PLOCAL:../databases/GratefulDeadConcerts admin my_admin_password
- Connecting to database [plocal:../databases/GratefulDeadConcerts]...OK
- orientdb>
Connect to a remote database:
- orientdb>
CONNECT REMOTE:192.168.1.1/GratefulDeadConcerts admin my_admin_password
- Connecting to database [remote:192.168.1.1/GratefulDeadConcerts]...OK
- orientdb>
For more information on other commands, see Console Commands.