步骤:
![](https://img.haomeiwen.com/i23717497/f5db1c0bf310759d.png)
![](https://img.haomeiwen.com/i23717497/51c4854b306ac58c.png)
![](https://img.haomeiwen.com/i23717497/faeaf5cf4abb34f7.png)
如果测试连接报错:
Server returns invalid timezone. Need to set 'serverTimezone' property. .
![](https://img.haomeiwen.com/i23717497/2344710ddea1aa50.png)
这是因为没有设置mysql的时区
解决步骤:
- 1,我们先来检查下mysql时区。
进入命令窗口(Win + R),连接数据库 mysql -hlocalhost -uroot -p - 2.继续输入 show variables like'%time_zone';
- 3,现在我们来设置时区。
输入set time_zone = '+8:00';就完成了
选择要的数据库
![](https://img.haomeiwen.com/i23717497/c98f3e548b162b07.png)
网友评论