Orientdb-list-database
提供:Dev Guides
OrientDB-リストデータベース
この章では、OrientDBコマンドラインからインスタンス内のすべてのデータベースのリストを取得する方法について説明します。
次の文は、infoコマンドの基本的な構文です。
LIST DATABASES
注-このコマンドは、ローカルまたはリモートサーバーに接続した後にのみ使用できます。
例
データベースのリストを取得する前に、リモートサーバー経由でローカルホストサーバーに接続する必要があります。 localhostインスタンスに接続するためのユーザー名とパスワードはそれぞれゲストとゲストであり、これらは 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/}>