idea 连接mysql数据库出现问题
需要添加数据库权限同时检查自己数据库的密码是否正确
# 这是mysql8.0之后的版本使用的sql语句
create user root@'%' identified by '123456';
grant all privileges on *.* to root@'%' with grant option;
# 这是mysql8.0之前的版本使用的sql语句
grant all privileges on *.* to ‘root‘@‘%‘ identified by ‘123456‘ with grant option
如果更改后还是无法连接就需要检查密码是否正确。
当然还有可能会出现这种问题:
Server returns invalid timezone. Need to set‘serverTimezone’property
直接点击Set time zone 设置UTC为GMT