By default, ApsaraDB MyBase for MySQL blocks all external connections — only 127.0.0.1 is in the default whitelist. Add your client IPs or Classless Inter-Domain Routing (CIDR) blocks to the whitelist to grant network access to your instance.
Prerequisites
Before you begin, ensure that you have:
-
An ApsaraDB MyBase for MySQL instance. For more information, see Create an ApsaraDB MyBase for MySQL instance
Quotas and limits
-
Each instance supports up to 50 IP address whitelists, with a combined total of up to 1,000 IP addresses and CIDR blocks.
-
The default whitelist cannot be deleted. You can clear or modify its entries.
-
Whitelist changes take effect within 1 minute.
-
Specifying
0.0.0.0/0allows all IP addresses to connect over the internet. Use this setting with caution.
Create a whitelist
-
Log on to the ApsaraDB for MyBase console.
-
In the upper-left corner, select a region.
-
In the left-side navigation pane, choose Instances > MySQL.
-
Find your instance and click Details in the Actions column. The ApsaraDB RDS console opens.
-
In the left-side navigation pane, click Data Security.
-
On the Whitelist Settings tab, click Create Whitelist.
-
In the Create Whitelist dialog box, fill in the following fields, then click OK.
Field Description Example Whitelist Name A name for this whitelist my-app-serversIP Addresses One or more IP addresses or CIDR blocks, separated by commas 192.168.0.1,192.168.0.0/24IP address formatting rules:
Entry type Behavior Example Single IP address Only that address can connect 192.168.0.1CIDR block All addresses in the range can connect 192.168.0.0/24(covers192.168.0.0–192.168.0.255)Multiple entries Separate with commas, no spaces 192.168.0.1,192.168.0.0/24To stay within the 1,000-entry limit, consolidate large sets of IP addresses into CIDR blocks. For example, use
10.10.10.0/24instead of listing all 256 addresses individually.