“new ephemeral certificate expires too soon: current time:”M

China☆狼群 提交于 2020-02-25 13:28:49

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!