I simply want to create a user in OrientDB 3.0.0m2 using the console.sh
.
As said in the documentation, I should be able to execute SQL statements.
Here is my use case.
In terminal 1, run the following:
docker run -it --name orientdb -p "2424:2424" -e ORIENTDB_ROOT_PASSWORD=rootpass orientdb:3.0.0m2
In terminal 2, run the following:
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}>
It seems that the console.sh
doesn't understand the SQL command CREATE USER
. Is this a bug, or am I doing the things in a wrong way?
It was fixed a few hours ago, see https://github.com/orientechnologies/orientdb/issues/7898
You can find the fix in latest snapshot https://oss.sonatype.org/content/repositories/snapshots/com/orientechnologies/orientdb-community/3.0.0-SNAPSHOT/