OrientDB教程

OrientDB 列表数据库

本章解释了如何从 OrientDB 命令行获取实例中所有数据库的列表。
以下语句是 info 命令的基本语法。
LIST DATABASES
注意-只有在连接到本地或远程服务器后才能使用此命令。

示例

在检索数据库列表之前,我们必须通过远程服务器连接到本地主机服务器。需要提醒的是,连接localhost实例的用户名和密码分别是guest和guest,在 orintdb/config/orientdb-server-config.xml文件中配置。
您可以使用以下命令连接到 localhost 数据库服务器实例。
orientdb> connect remote:localhost guest 
它会询问密码。根据来宾的配置文件密码也是来宾。如果连接成功,您将得到以下输出。
Connecting to remote Server instance [remote:localhost] with user 'guest'...OK 
orientdb {server = remote:localhost/}>
连接到 localhost 数据库服务器后,您可以使用以下命令列出数据库。
orientdb {server = remote:localhost/}> list databases
如果执行成功,您将获得以下输出-
Found 6 databases: 
* demo (plocal) 
* s2 (plocal) 
* s1 (plocal) 
* GratefulDeadConcerts (plocal) 
* s3 (plocal) 
* sample (plocal) 
orientdb {server = remote:localhost/}>
昵称: 邮箱:
Copyright © 2022 立地货 All Rights Reserved.
备案号:京ICP备14037608号-4