Getting Started
(Optional) Modifying Security Group Rules
A security group is a collection of access control rules for cloud resources, such as cloud servers, containers, and databases, to control inbound and outbound traffic. Cloud resources associated with the same security group have the same security requirements and are mutually trusted within a VPC.
You can modify your security group policy based on service requirements, for example, by adding, modifying, or deleting a TCP port, as follows:
- Adding a security group rule: Add an inbound rule and enable a TCP port if needed.
- Modifying a security group rule: Inappropriate security group settings can be a serious security risk. You can modify security group rules to ensure the network security of your instances.
- Deleting a security group rule: If the source or destination IP address of an inbound or outbound security group rule changes, or a port does not need to be enabled, you can delete the security group rule.
(Optional) Changing the Password of the MongoDB Database
- Log in to the ECS console, select the created instance whose suffix is primary, and click Remote Login.
Figure 1 Logging in to the ECS console
- Enter the username and password and press Enter.
Figure 2 Logging in to Linux cloud servers
- Run mongo -uroot -pPassword --authenticationDatabase "admin" to log in to the database.
Figure 3 Logging in to the MongoDB database
- Switch to the admin database, enter db.changeUserPassword("root","new password"), and press Enter. After the password is changed, enter exit to exit the MongoDB database.
Figure 4 Switching to the admin database and changing the password of user root
Verifying the MongoDB Database
- On the ECS console, select the created instance whose suffix is primary, and click Remote Login to log in to the Linux instance.
Figure 5 Logging in to the ECS console
- Run mongo -uroot -pPassword --authenticationDatabase "admin" to log in to the MongoDB database. If the output contains PRIMARY, the MongoDB database is deployed successfully.
Figure 6 Database connection
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot