Comment:
vim /etc/mongod.conf
#security:
#security:
# authorization: enabled
/etc/init.d/mongod restart
# mongo
> use admin
switched to db admin
> db.changeUserPassword("root", "wbqAz6zYT0")
> exit
Uncomment:
vim /etc/mongod.conf
#security:
security:
authorization: enabled
/etc/init.d/mongod restart...
Thứ Hai, 15 tháng 1, 2018
Create User Mongodb
1. Connect to MongoDB
mongo --port 27017 -u siteUserAdmin -p password --authenticationDatabase admin
2. Create the new user.
use reporting
db.createUser(
{
user: "reportsUser",
pwd: "12345678",
roles: [
{ role: "read", db: "reporting" },
{ role: "read", db: "products" },
{ role: "read", db: "sales" },
{ role: "readWrite", db: "accounts" }
]
}
...
Thứ Năm, 11 tháng 1, 2018
Backup to Google Drive
git clone https://github.com/bachvtuan/Backup-To-Google-Drive.git
pip install --upgrade google-api-python-client
pip install --upgrade oauth2client==1.5.2
pip install PyOpenSSL
you create your google drive api first at Link.
After google drive project is created, You go to API & Auth tab and click on Credentials. From here, click on button with label Create new Client ID and select service...
pip install fails with “connection error: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:598)”
Error SSL when install using pip
# pip install --upgrade google-api-python-clientCollecting google-api-python-client Could not fetch URL https://pypi.python.org/simple/google-api-python-client/: There was a problem confirming the ssl certificate: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:579) - skipping Could not find a version that satisfies the requirement google-api-python-client...
Đăng ký:
Bài đăng (Atom)