问题
I've been connecting to Google Cloud Platform MySQL from the CloudSQL Proxy on Windows for years. All of a sudden, I'm unable to connect.
When I start the proxy using PowerShell, it launches fine and says ready for new connections. Then when I try to connect to it on 127.0.0.1, the client will report back: "Lost connection to MySQL server during query (127.0.0.1:3306)"
The CloudSQL Proxy will report in the terminal: "error: new ephemeral certificate expires too soon: current time: 2019-06-28 23:54:29 +0000 UTC, certificate expires: 2019-06-28 16:54:25.8818364 -0700 PDT m=+291.599345701"
Any ideas what would have caused this change and what to do about it?
My GCE instance and Python code are still able to interact with the database just fine.
I also tried connecting from the Cloud Shell and get: "ERROR 1045 (28000): Access denied for user 'root' gcp mysql"
回答1:
Its 2019 and Microsoft are still confused about time zones. Set your hardware clock to UTC and telll your OS to use the local timezone.
Be warned - this may break other things which interpret the time on your machine using inconsistent methods - do go through a reboot cycle to check everything is working as it should.
来源:https://stackoverflow.com/questions/56814116/new-ephemeral-certificate-expires-too-soon-current-timem