Access the Alibaba Cloud RDS cloud database from the public network

Access the Alibaba Cloud RDS cloud database from the public network

In the previous blog, I taught you how to publish the project to the cloud server. This time, I will teach you how to use the public network to connect to the cloud database. Of course, you can also install MySQL and other databases on your own cloud server to connect (but the disadvantage is that you need to complete the installation and creation of the database and the daily maintenance and protection of the security group. In addition, the front-end and back-end projects have already been mounted on the cloud server, and coupled with the pressure of users accessing the database, it is easy to cause the CPU or memory load of the cloud server to be too high). So an independent cloud database is very necessary.

Doing so is very unsafe. Generally speaking, we only open the IP of the local machine and your own cloud server to access the cloud database. (Local ip, open the system cmd command line and enter ipconfig to see it, cloud server ip can be seen in its own and server information) 7. Create a database account 8. When creating a database account, the number of high-privilege accounts is limited (taking my version of MySQL as an example, only one high-privilege account is allowed to be created) 9. When creating a database, when selecting the corresponding binding account, the high-privilege account cannot be bound (because the high-privilege account can access any library in your cloud database by default, so no binding is required) but ordinary accounts If you want to access the database, you need to bind the corresponding library . 10. For database connection and management, we will use three different panels for database access connection and management. 11. Before accessing, you need to find and copy your connection string in the database information. 12. In the first way, DMS panel management, the access address port is the connection string just copied, and enter the database account password just created to log in. DMS login interface 13. RDS database login, the above method is the same as login
insert image description here

insert image description here

insert image description here
insert image description here

insert image description here

insert image description here

insert image description here

insert image description here

insert image description here

insert image description here

insert image description here

insert image description here

insert image description here

insert image description here

The interface after logging in to the RDS database
insert image description here
14. Use a database connector manager such as sqlyog or Navicat to connect, and enter the corresponding information in the same way to connect (provided that your machine ip needs to be added to the whitelist). The above is the connection to the cloud database
insert image description here
. After that, you can manage the cloud database on the panel you are familiar with.

Guess you like

Origin blog.csdn.net/JavaD0g/article/details/107436829