Comments (9)
Hello, if you have a mongo container running you should use his name as host. The other are from the user(s) you created with init script or env variable. If you have only an "admin" user you should omit "Database" so you have access to your others databases.
from mongodb-php-gui.
HI, i tried to login via admin and gave connection as Host=127.0.0.1 and port=27017 , got error
{
"error": {
"code": 13053,
"message": "No suitable servers found (serverSelectionTryOnce
set): [connection refused calling ismaster on '127.0.0.1:27017']"
}
}
note : i checked in host machine that mongo db active and running ..please suggest me what i can do for this..
here i don't have mongo container , i have configured mongo db in dedicated host
from mongodb-php-gui.
Hello. If your MongoDB host is accessible from Internet: use its IP address as host. Else: use 172.17.0.1 as host. Let me know if it works...
from mongodb-php-gui.
Hi, yes it worked for login, steps i followed like
created a user in mongo cli
and used same user credential and database name in login page with host 172.17.0.1 and port 27017.
but if i try to add user from ui for that DB it is giving me same error " message": "No suitable servers found (serverSelectionTryOnce set): [connection refused calling ismaster on '127.0.0.1:27017']"" please find attachment
and one thing with out giving DB name i am not able to login..so how to login as a admin ? any suggestion for this ?
from mongodb-php-gui.
So when you try to add an user from UI, there's an error? Can you please attach a screenshot?
from mongodb-php-gui.
after adding query it is not giving result also no error..
from mongodb-php-gui.
@amrithadevadiga22 Hi. Thanks for the screenshots. To bypass the error "The SCRAM_SHA_256 authentication mechanism requires libmongoc built with ENABLE_SSL", follow these steps:
- Replace Dockerfile at project's root directory with this one:
FROM php:7.4-cli-alpine
RUN apk update && apk upgrade
# Clone project repository.
RUN apk add --no-cache git
WORKDIR /opt/mongodb-php-gui
RUN git clone https://github.com/SamuelTS/MongoDB-PHP-GUI.git .
# Enable MongoDB PHP ext.
RUN apk add --no-cache autoconf build-base curl-dev openssl-dev
RUN pecl install mongodb-1.8.2 && docker-php-ext-enable mongodb
# Install PHP dependencies.
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
RUN composer install
# Start PHP built-in server.
EXPOSE 5000
CMD ["php", "-S", "0.0.0.0:5000"]
- Run again
docker build -t mongodb-php-gui .
at project's root directory. - Run
docker run -it -p 5000:5000 mongodb-php-gui
at project's root directory. - Open your browser at this address: http://127.0.0.1:5000/ to access GUI.
Then, about querying, you don't need to write full command db.mycol.find().pretty()
. Just write for example { "_id": 1 }
.
from mongodb-php-gui.
@SamuelTS Hi, Thanks for the reply..
i want to know ,what should be user role for a database to perform any operation ..i was getting authentication error for a user with the role "userAdmin" with user name "employee", for db "employee"
and one more thing like i tried some basic mongo db query commands
eg: db.COLLECTIONNAME.findOne()
db.mycol.find({ $and: [ {:}, { :} ] })
db.mycol.find().pretty() etc..
non of the query giving output..as you gave example above like "{ "_id": 1 }", i didn't get how it actually working..and if i want to query the database with some condition how can i write a query !!
from mongodb-php-gui.
@amrithadevadiga22 Hello.
I suggest you to drop then re-create user named "employee" for db "employee" with role readWrite.
Then logout, login with user "employee". Don't forget to use "employee" db when you fill login form.
You can query database using {}
syntax. Input only value passed normally to .find()
. Example:
from mongodb-php-gui.
Related Issues (20)
- Secure login with hCatpcha HOT 1
- Add reference to the GitHub repository/issues HOT 1
- Quick edit full document entry HOT 3
- Import from CSV / Export to CSV HOT 1
- Login for user having only database specific roles HOT 1
- Deny access to private files to improve security HOT 1
- Provide tagged Docker image HOT 5
- Not working behind ingress controller HOT 2
- Various feature requests for navigation and search
- Database visualization gets really slow with huge dataset HOT 1
- Edit document null attribute doesn't work
- Support for ARM64 architecture HOT 4
- Login page: store multiple target connection URIs
- Login page: do not retain credentials
- How to query an ObjectId field not named _id? HOT 3
- Accessing through subdirectory (reverse proxy)
- No input file specified.
- URI login problem HOT 4
- How to deploy on kubernetes
- Optimization of data visualization
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mongodb-php-gui.