Hello Hirotake,
The error that you have indicated in your message occurs if successful connection
is not established even after the max_connect_errors successive connection requests from a host. At that point the host gets blocked to make further connections by the Server.
I do see that you have indicated the on-premise MySQL instance and another instance built from source code (5.7.25) works as intended but not MySQL based Cloud SQL Instance.
In this regard, I have noticed max_connect_errors flag is not supported at the moment as it is not in the supported flags list of MySQL based Cloud SQL instance.
In addition to that I have not seen the error that you have indicated among known connection issues of MySQL based Cloud SQL.
However after connecting to MySQL database of Cloud SQL and running the command “show variables like "max_connect_errors";”, I can see the max_connect_errors value is 100 as described in the MySQL documentation.
Based on that to me it appears that MySQL based Cloud SQL instance is not working as intended. I would suggest you to report the issue by creating a Public Issue selecting the Cloud SQL component under the Storage and Databases section of this document.
In case you need to share any Project specific information please select the Private component to make sure the information is not visible to Public. After that one of the Google Cloud Support team members will assist you further.
Hello Hirotake,
I am glad to know that you have got confirmation from the Google Cloud Platform Support team on your issue and I also would like to thank you for updating me which will be helpful for other users.