Right code and parameters to open a embedded db #10054
Answered
by
tglman
hgftrdw45ud67is8o89
asked this question in
Q&A
-
I tried something like
does the create function has a default password not "admin" or something? I tried to search even in javadocs,but doesnt seems to state it. or is it my code is simply wrong like there's a newer api? |
Beta Was this translation helpful? Give feedback.
Answered by
tglman
Jan 8, 2024
Replies: 1 comment 1 reply
-
Hi, This should help: try (OrientDB orientDb = new OrientDB("embedded:./databases/",OrientDBConfig.defaultConfig())) {
orientDb.execute("create database "+DATABASE_NAME+ " plocal users (admin identified by 'adminpwd' role admin)").close();
try(ODatabaseSession database = orientDb.open(DATABASE_NAME, "admin", "adminpwd")) {
}
} This is because we removed the creation of default users so you need to provide an user and a password yourself on database creation, in this way you can provide your strong admin password. Regards |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
hgftrdw45ud67is8o89
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi,
This should help:
This is because we removed the creation of default users so you need to provide an user and a password yourself on database creation, in this way you can provide your strong admin password.
Regards