Enable public access
If the Kingsoft Cloud Elastic Compute (KEC) instance that needs to access a KRDS for MySQL instance is deployed in a region different from that of the KRDS for MySQL instance or a third-party system needs to access the KRDS for MySQL instance, you can apply for a public IP address for the KRDS for MySQL instance to enable public access.
Log in to the KRDS for MySQL console, click Instance in the left navigation pane, find the instance, and click Manage in the Operation column. On the instance details page, find WAN IP and click Apply for WAN IP.
- The public IP address for a KRDS for MySQL instance takes effect after a minute or so. Then, you can access the instance by using the public IP address and port number.
- You must add the IP address of the client to the IP address whitelist of a KRDS for MySQL instance before you can connect to the instance from the Internet.
- We recommend that you allow visits from the Internet to KRDS for MySQL only for database management and development purposes. For business access, use the internal network.
- You cannot access a KRDS for MySQL instance by using a public IP address from a KEC instance in the same region.
- After public access is enabled, the public IP address is displayed on the instance details page.
To disable public access, you can click Release the WAN IP. After public access is disabled, the public IP address is recycled. When you enable public access next time, a new public IP address is allocated to the instance.
- After you disable public access, you cannot access the KRDS for MySQL instance by using the public IP address and port number. Disabling public access takes about 1 minute. Make sure that the public IP address is not used in your business system, to avoid impact on your business.
- After you disable public access, we recommend that you promptly delete the IP address of the client from the security group that is used to control public access to the KRDS for MySQL instance.
- If you enable public access again, a new public IP address and a new port number are allocated.
Kingsoft Cloud provides public IP addresses for KRDS for MySQL instances for free.