Getting the Url of a mongo database installed on a linux server - mongodb

I installed ubuntu server and mongodb on my laptop to run a testserver and everthing works fine.
Now i would like to use the database to store data from a flutter app therefore i need the connection url to the database.
The mongoshell shows the following:
Connecting to:mongodb://127.0.0.1:27017/?directConnection=true&serverSelectionTimeoutMS=2000&appName=mongosh+1.6.1
I don`t know if the url is correct or where can i find it?
Thank you!

Related

why is MongoDbB not running and not working?

i installed MongoDB compass and when i try to connect with hostname localhost ,Port: 27017
i receive this error: connect ECONNREFUSED 127.0.0.1:27017.
I also looked in Task manager and MongoDB was not running. Thank you for your help
MongoDB compass is only a client. you should install the mongo community edition (for development setup) and then use compass client to access it.
https://docs.mongodb.com/manual/installation/
MongoDB compass is graphical user interface (GUI) for the actual mongoDB. That is to say, you need an actual mongoDB running in order to be able to interact with the data through the GUI.
Once you have the database install, you can start it by typing the command mongo in the shell. There after you should be able to return to mongoDB compass and view the data in you database (I should mention, I'm assuming that you're running on the default port and on your local machine).

Importing collections breaks Meteor app deployed with mup

My Meteor app is running on a Digital Ocean droplet.
Meteor: v1.5.3
Server: Ubuntu 14.04.5 x 64
It deploys fine with mup but when I use Studio 3T to import the collections from my old 1.2 app, I see continual error messages in the console like:
GET http://xxx.xx.xx.xx/sockjs/info?cb=u7lbhqd_js net::ERR_CONNECTION_REFUSED
GET requests for resources including images and routes are being refused. The app does run but very slowly and most images are not showing. It is not consistent; the same image will be missing, then appear when I return to the route.
I have imported the same JSON collections to my localhost version and they run perfectly.
I am connecting to the live database by forwarding the mongo instance to localhost with:
ssh -L 4321:localhost:27017 -i ~/.ssh/id_rsa root#xxx.xx.xx.xx
All the imported collections look fine on the live database. I can edit values in documents OK, it's only when I import an entire collection from a JSON file that it goes wrong. And I can't see why updating the collections would interfere with the GET requests.
Has anybody had a similar problem / any idea how to figure out what's going wrong?

MongoDB getting error while setting up at WAMP localhost for window

I am setting up MongoDB on localhost WAMP,
when i hit the port number http://127.0.0.1:28017 getting following error:
It looks like you are trying to access MongoDB over HTTP on the native driver port.
Please let me know how can i view database like phpmyadmin for MongoDB.
MongoDB does not offer by default a Webinterface for Administration, so you have to use additional Software. I know that Adminer also supports MongoDB.
Otherwise please read this Section in the MongoDB Docs (which are really great for learning MongoDB. I haven't tried all of them, but i think Adminer will do the Jobs. The MongoDB Shell is also great.
You can use cPanel too for this. cPanel server , because it is just another linux server.

Can't connect to postgresql server installed locally on my machine

I have installed the DSP(Dreamfactory Service Platform) locally on my Mac Book Pro using Bitnani.
I have a PostGreSQL server running locally on my Macbook, which I want to connect to using the DSP.
I am successfully able to connect to my PostGreSQL server from other applications, which essentially means that there is no problem with the setup.
However, on trying to connect the same from DSP I get the error:- "Failed to launch service "sql": CDbConnection failed to open the DB connection."
My connection string is :- "pgsql:host=localhost;dbname=Pinu"
Also, the password has been correctly entered.
The port is default as 5432. Whether or not I enter the same in the connection string, the connection always fails.
Even though I am trying to add the service as Remote SQL DB, I know that it's actually on the same local host. Not sure if that is the issue.
I also tried entering - 127.0.0.1 in place of localhost, but still I see the same issue.
Any help in this regard would be highly appreciated!
After talking to you via email, it looks like the root issue here is that you haven't successfully upgraded your DSP to the latest version. We are releasing DreamFactory version 1.8 on Bitnami tomorrow, so you should upgrade to the latest version.
As far as your PostgreSQL issue let's explore some options:
1) Connection strings:
a) pgsql:host=localhost;dbname=Pinu
b)
pgsql:host=localhost:5432;dbname-Pinu
c)
pgsql:host=localhost;port=5432;dbname=Pinu
2) If these don't work, try substituting your localhost with
127.0.0.1 (as you've tried previously, but test this in all scenarios).
3)
pgsql:host=localhost;port=5432;dbname=series1;schema=schema_name_here
Typically, Option A should work without a problem.
Give these a try if you would, and if you need some help upgrading then reach out to me again via email.
--Thanks,
Mark

Cakephp Migrations.migration run all get Error: Database connection "Postgres" is missing, or could not be created

Someone please help me,
I'm new in postgresgl. Im developing application with Cakephp 2.5.1 with Migrations Plugin to run sql query under Ubuntu console.
If I try to create simple script for testing purpose, like this:
http://pastebin.com/dYv48VQc
It's work!
But I don't know what happend when I try to run Migrations.migration run all under Ubuntu console, I get some error like this:
http://pastebin.com/tBTr8FgP
And here is my Config/database.php file content, I used same user, pass, host, port and db name:
http://pastebin.com/3BzuQxmr
I have check from ubuntu console, and the PDO for pgsql has been enabled
http://pastebin.com/9aCL5ys8
Please help me, thank you very much.
This issue was resolved. I make some fresh installation of ubuntu and all service. Such as Apache, php, mysql, postgres. Then All Works!
Thanks.