我只想使用console.sh
。
如documentation所述,我应该能够执行SQL语句。
这是我的用例。
在终端1中,运行以下命令:
docker run -it --name orientdb -p "2424:2424" -e ORIENTDB_ROOT_PASSWORD=rootpass orientdb:3.0.0m2
在终端2中,运行以下命令:
docker run -it --rm --link orientdb:orientdb orientdb:3.0.0m2 /orientdb/bin/console.sh
OrientDB console v.3.0.0m2 (build 4abea780acc12595bad8cbdcc61ff96980725c3b) https://www.orientdb.com
Type 'help' to display all the supported commands.
orientdb> CREATE DATABASE remote:orientdb/db root rootpass PLOCAL
Creating database [remote:orientdb/db] using the storage type [PLOCAL]...SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
Connecting to database [remote:orientdb/db] with user 'root'...OK
Database created successfully.
Current database is: remote:orientdb/db
orientdb {db=db}> CREATE USER myuser IDENTIFIED BY userpass ROLE admin
Error: com.orientechnologies.orient.core.sql.OCommandSQLParsingException: Error parsing query:
^
Encountered " <CREATE> "create "" at line 1, column 1.
Was expecting one of:
<IF> ...
<FOREACH> ...
";" ...
<IF> ...
DB name="db"
Error Code="1"
DB name="db"
orientdb {db=db}>
似乎console.sh
并不了解SQL command CREATE USER
。这是一个错误,还是我以错误的方式做事?
答案 0 :(得分:1)