Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
当我检查 GMT 时间here是05:40:00时,同时我在 mysql 中运行以下查询,
here
SET time_zone='+00:00'; // to get GMT time SELECT NOW();
上面的查询是05:37:50。所以在 mysql 中,我与GMT的时差约为 2 分钟。它必须给出05:40:00而不是05:37:50。如何解决这个问题?
感谢您宝贵的时间。
我无法在我的 Linux 机器上重现它。
最有可能运行 MySQL 服务器的机器没有正确配置时间服务。
根据您的 MySQL 运行的操作系统,您应该设置时间同步。对于 Linux,我们会使用 ntpd 包。