On the linux shell, run the below.

mongo

use opaddress

db.dropDatabase()

exit

/usr/local/omk/bin/opaddress-cli.pl act=setup-db

And that should be all you need to do. As long as the database exists, opAddress will prime it with any required data.

Example console output doing that is below (with added show dbs to show the registered databases along with their sizes).

mark@dev:~$ mongo
MongoDB shell version v3.4.24
connecting to: mongodb://127.0.0.1:27017
MongoDB server version: 3.4.24
Server has startup warnings: 
2021-10-14T18:10:22.745+1000 I STORAGE  [initandlisten] 
2021-10-14T18:10:22.745+1000 I STORAGE  [initandlisten] ** WARNING: Using the XFS filesystem is strongly recommended with the WiredTiger storage engine
2021-10-14T18:10:22.745+1000 I STORAGE  [initandlisten] **          See http://dochub.mongodb.org/core/prodnotes-filesystem
2021-10-14T18:10:24.881+1000 I CONTROL  [initandlisten] 
2021-10-14T18:10:24.882+1000 I CONTROL  [initandlisten] ** WARNING: Access control is not enabled for the database.
2021-10-14T18:10:24.882+1000 I CONTROL  [initandlisten] **          Read and write access to data and configuration is unrestricted.
2021-10-14T18:10:24.882+1000 I CONTROL  [initandlisten] 

> show dbs
admin      0.000GB
local      0.000GB
nmisng     0.011GB
opaddress  0.004GB

> use opaddess
switched to db opaddess

> db.dropDatabase()
{ "dropped" : "opaddress", "ok" : 1 }

> show dbs
admin   0.000GB
local   0.000GB
nmisng  0.011GB

> exit
bye


mark@dev:~$ /usr/local/omk/bin/opaddress-cli.pl act=setup-db


mark@dev:~$ mongo
MongoDB shell version v3.4.24
connecting to: mongodb://127.0.0.1:27017
MongoDB server version: 3.4.24
Server has startup warnings: 
2021-10-14T18:10:22.745+1000 I STORAGE  [initandlisten] 
2021-10-14T18:10:22.745+1000 I STORAGE  [initandlisten] ** WARNING: Using the XFS filesystem is strongly recommended with the WiredTiger storage engine
2021-10-14T18:10:22.745+1000 I STORAGE  [initandlisten] **          See http://dochub.mongodb.org/core/prodnotes-filesystem
2021-10-14T18:10:24.881+1000 I CONTROL  [initandlisten] 
2021-10-14T18:10:24.882+1000 I CONTROL  [initandlisten] ** WARNING: Access control is not enabled for the database.
2021-10-14T18:10:24.882+1000 I CONTROL  [initandlisten] **          Read and write access to data and configuration is unrestricted.
2021-10-14T18:10:24.882+1000 I CONTROL  [initandlisten] 

> show dbs
admin      0.000GB
local      0.000GB
nmisng     0.011GB
opaddress  0.001GB

> exit
bye



  • No labels