I have set up the database on Mongodb Atlas and have connected to the database via application however it is not connecting to the database, I have tried using the Mongo shell also
I have tried to set up a new connection thinking it may be a corrupt file on my project but it still has the same issue. I also tried to run:
sudo apt update
sudo apt install -y mongodb
sudo systemctl status mongodb
but i get:
dpkg: error processing package mongodb (--configure):
dependency problems - leaving unconfigured
Errors were encountered while processing:
mongodb-server
mongodb
likewise if i try sudo service mongodb restart it then displays:
Tue Apr 2 21:16:28.214 Error: Invalid port number "//testdb-sc1hr.mongodb.net" in connection string "mongodb+srv://testdb-sc1hr.mongodb.net/cookbook" at src/mongo/shell/mongo.js:134
exception: connect failed
I have tried using sudo apt remove
but i also get
invoke-rc.d: initscript mongodb, action "start" failed.
dpkg: error processing package mongodb-server (--configure):
subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of mongodb:
mongodb depends on mongodb-server (>= 1:2.4.1-2); however:
Package mongodb-server is not configured yet.
Im very new to this and i feel like im just going round in circles now. I have also tried connecting with mongodb compass but it also displays "Authenication Failed"
Im not sure what else to try