DataGrip :Cannot connect to a database

初次使用DataGrip,初次创建连接出现如下错误:

Connection to sqltest failed. [08001] Could not create connection to databas

官方已给出一些解决方案:点击跳转
本人犯错的原因是MySQL的版本(5.7)与Driver的版本(8.1)不兼容。
在这里插入图片描述
视图自行修改Driver的版本。File-》data sources->操作如图所示:
在这里插入图片描述

其他配置要保证正确,账号密码,数据库名是否存在等。

你可能感兴趣的:(IDEA)