Tag : shell

The mongodb database is connected through a shell, and clusters deployed by replication can be connected as follows: mongos mongodb://ctl1m:27017,ctl2m:27017,ctl3m:27017/? replicaSet=rs0 So, how should I connect if it is a sharding cluster deployment?I have tried the following, but I will report an error: [root@ctl1m ~]# mongos mongodb://ctl1m:30000,ctl2m:30000,ctl3m:30000/ Error parsing command line: too many positional options ..

Read more

This is the field after joining us. I don’t know how to decrypt it. Please ask for support!13zaxGVjj9MNc2jyvDRhLyYpkCh323MsMq Address of Bitcoin Bitcoin from entry to mastery.The first step is to install the Bitcoin official client to obtain your collection Address. BTC protocol encourages the use of a different collection address for each collection to maintain ..

Read more

mongo test –eval db.createUser({user:”rwuser”, pwd:”titan7vc65x”, roles:[{role:”readWrite”, db:”test”}]}) This command can’t be used either. I need to create mongodb users in shell scripts. I can’t find any information online. You are right to create statements. What you are looking for is not in mongo’s data. What you need to know is the usage of linux shell, ..

Read more

Automate MongoDB with shell Scripts Run the written. /show.sh scriptIt was found that the mongo link could be established, but the second link could not be started. The script reads as follows #!/bin/sh mongo WordPress show collections db.posts.find().limit(10) I don’t know why. The mongo shell statement starts from the second one, and of course it ..

Read more

At present, many docker ui can remotely call docker’s rest interface to operate the container. exec can be used to execute commands inside the running container. Suppose my calls exec interface are as follows:POST hostid:port/containers/{id}/execParameters are:AttachStderr: trueAttachStdin: trueAttachStdout: trueCmd: [“bash”]Tty: trueid: “xxxxxx”After successfully creating an exec instance, how should you proceed to add commands, such ..

Read more

This is my script for automatically deploying docker docker stop timesguide-service \ && docker rm timesguide-service \ && cd /app/timesguide-service \ && docker build -t timesguide-service . \ && docker run -e TZ=”Asia/Shanghai” -d timesguide-service There is no problem on the compiled mirror machine But on the new machine, there will be:Error response from daemon: ..

Read more

#! /bin/bash # Pull Mirror sudo docker pull mysql:5.7.21 # Create Directory sudo mkdir /opt/mysql_5.7.21 # Used to get unmapped sudo docker run -p 3306:3306 –name mysql_5.7.21 -e MYSQL_ROOT_PASSWORD=123456 -d mysql:5.7.21 sudo docker cp mysql_5.7.21:/etc/mysql /opt/mysql_5.7.21/etc sudo docker cp mysql_5.7.21:/var/log/mysql /opt/mysql_5.7.21/logs sudo docker cp mysql_5.7.21:/var/lib/mysql /opt/mysql_5.7.21/data # Remove Mirror sudo docker stop mysql_5.7.21 && sudo ..

Read more

Start the docker container in a shell script as follows: #! /bin/bash export EXE_FILE=”rdbs_cbb_test aom_cell_test” ; docker login -u admin -p admin123 registry:5000; docker run –rm \ registry:5000/compiler/cmake-unit-test:v1.0 bash -c ‘ \ # EXE_FILE=”rdbs_cbb_test aom_cell_test”; \ IFS=” ” read -r -a arr <<< “$EXE_FILE”; \ for s in ${arr[@]}; \ do \ echo $s; \ ..

Read more