Skip to content

Right code and parameters to open a embedded db #10054

Answered by tglman
hgftrdw45ud67is8o89 asked this question in Q&A
Discussion options

You must be logged in to vote

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

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@hgftrdw45ud67is8o89
Comment options

Answer selected by hgftrdw45ud67is8o89
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants