$ gcloud sql users delete proxyuser --instance dev-instance-XXX --host <host>prox...@35.234.129.60 will be deleted. New connections can no longerbe made using this user. Existing connections are not affected.Do you want to continue (Y/n)? yDeleting Cloud SQL user...failed.ERROR: (gcloud.sql.users.delete) INTERNAL_ERROR
Hello Pilar,
The possible cause of this error is that you are trying to delete a user that has been granted privileges on other objects. Therefore, you need to:
1-Connect to your PostgreSQL instance with a user account with admin privileges:
gcloud sql connect [YourInstance] --user=[YourUser]
2-Revoke all privileges from the user you want to delete
REVOKE ALL PRIVILEGES ON DATABASE [DBname] from [UserToDelete];
3-Run this command to delete the user:
gcloud sql users delete [USER_NAME] --host=[HOST] --instance=[INSTANCE_NAME]