问题
I have been looking at the console’s billing as far as Cloud SQL and the VM Instance is concerned. I see that a lot of the cost comes from the idling hours of the Cloud SQL IP address. I am unsure as to where the settings are for this as i have tried to “unassign” the ip address that is associated with my Cloud SQL Instance. Are these charges static, as in am I always, no matter what, going to be charged for the ip address constantly or is there a way to turn this off when I am not using the Cloud SQL Instance? If so, how can I?
回答1:
You will be charged $0.01 for every hour the instance is not active and has an IPv4 address assigned. You can un-assign IP address using the Google Developers Console, go to your Cloud SQL instance, click on Edit and uncheck 'Assign an IPv4 address to my Cloud SQL instance' box.
回答2:
The IP address will always be charged when the instance is not running. You can unassign an IP address to prevent this idle charge.
回答3:
Click your SQL instance to go to Instance details > Connections > Public IP - uncheck it.
https://cloud.google.com/sql/docs/mysql/configure-ip
Note: When you disable public IP for an instance, you release its IPv4 address. If you later reenable public IP for this instance, it will get a different IPv4 address, and all applications that use the public IP address to connect to this instance must be modified.
Basically if you remove the public connection to your instance the IP is released too.
回答4:
https://cloud.google.com/sql/docs/mysql/configure-ip
Click the instance name to open its Instance details page.
Select the Connections tab.
Deselect the Public IP checkbox.
Click Save to update the instance.==> Save is disabled on unchecking Public IP checkbox. Looks like either Private IP or Public IP checkbox should be selected to enable Save button.
来源:https://stackoverflow.com/questions/25249863/google-cloud-sql-idling-ip-address