Search code examples
consoleorientdbdrop-database

OrientDB Console.bat errors out with invalid username password for drop database command


Using the OrientDB Console.bat for manage oreient-db databases shows some inconsistent behaviour.

1) I created a new db named demox using the below command :

 orientdb> create database plocal:../databases/demox root root plocal graph
 Creating database [plocal:../databases/demox] using the storage type [plocal]...
 2018-04-12 19:10:26:775 INFO  Storage 'plocal:../databases/demox' is 
 created under OrientDB distribution : 2.2.33 (build 77584cd6827f647cf4aa231cf27bd6f10bc04e2c, branch 2.2.x)
 Database created successfully.

 Current database is: plocal:../databases/demox

2) Next i try to run the drop database command and it errors out saying invalid username or password

 orientdb {db=demox}> drop database plocal:../databases/demox root root 
 Error: com.orientechnologies.orient.core.exception.OSecurityAccessException: User or password not valid for database: 'demox'
    DB name="demox"
orientdb {db=demox}>

However If you see the credentials used in step1 and step2 both are same. I am not sure where the issue is , or am i missing something in the drop database command.

Why would the console error out even when i am using the same credentials for drop-database command as the one i have used while creating the database


Solution

  • use the same command but with the credentials of admin (user:admin pass:admin)

    drop database plocal:../databases/demox admin admin
    

    If you have any more questions about this feel free to ask.