mybatis查询mysql的datetime类型数据时间差了14小时

时区不一致导致,一个是美国时间,一个是北京时间

 

Mysql错误:Ignoring query to other database解决方法 

折腾了半天才发现原来是在连接mysql时没有"-u"参数导致的
D:\Program Files\MySQL\MySQL Server 5.6\bin>mysql -uroot

重新连接mysql 加上-u参数 一切正常

相关文章: