数据库时间差怎么设置
网站编辑2023-06-29 16:39:27504
sysdate -p -s '%Y-%m-%d %H:%M:%S T00:00:00 2021-01-01 00:00:00' /etc/timezone/systemctl restart machine
这个命令会将 /etc/timezone/systemctl 下的 timezone 参数设置为 Asia/Shanghai,然后重启 Machine。在 SQL 命令中,可以使用 -f 参数来设置时间差,例如:
sql -fs -p -s '%Y-%m-%d %H:%M:%S T00:00:00 2021-01-01 00:00:00' /etc/timezone/systemctl restart machine
这会重启 MySQL 服务器,使其正常运行。







