“新的临时证书过期太早:当前时间:M [英] "new ephemeral certificate expires too soon: current time:"M

查看:96
本文介绍了“新的临时证书过期太早:当前时间:M的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

多年来,我一直从Windows上的CloudSQL代理连接到Google Cloud Platform MySQL.突然之间,我无法连接.

当我使用PowerShell启动代理时,它会正常启动,并表示已准备好进行新连接.然后,当我尝试在127.0.0.1上连接到它时,客户端将报告: 在查询过程中丢失了与MySQL服务器的连接(127.0.0.1:3306)"

CloudSQL代理将在终端中报告: 错误:新的临时证书过期太早:当前时间:2019-06-28 23:54:29 +0000 UTC,证书过期:2019-06-28 16:54:25.8818364 -0700 PDT m = + 291.599345701"

有什么主意会导致此更改以及如何处理吗?

我的GCE实例和Python代码仍然可以与数据库进行交互.

我还尝试了从Cloud Shell连接并获得: 错误1045(28000):用户'root'gcp mysql的访问被拒绝"

解决方案

2019年和Microsoft仍然对时区感到困惑.将您的硬件时钟设置为UTC并告诉您的操作系统使用本地时区.

警告-这可能会破坏使用不一致的方法解释您的计算机上时间的其他内容-请执行重新启动周期以检查一切是否正常.

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"

解决方案

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.

这篇关于“新的临时证书过期太早:当前时间:M的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆