IDEA|关于SQL语句警告No data sources are configured to run this SQL...和SQL Dialect is Not Configured

有两个警告
①No data sources are configured to run this SQL and provide advanced
②SQL Dialect is Not Configured
在这里插入图片描述
虽然这个警告并不影响程序的进行,然而还是不希望在写sql语句的时候被大幅度地警告,以下是我有效的解决方法
警告①:添加数据库的连接配置
在这里插入图片描述
在这里插入图片描述
填好信息后点击Test Connection
出现错误
在这里插入图片描述

把url改为:jdbc:mysql://localhost:3306/hmmtest?serverTimezone=GMT
也就是加上?serverTimezone=GMT

在这里插入图片描述
最后别忘了点Apply!!!
警告①消失
在这里插入图片描述
refresh:
在这里插入图片描述
警告②
在这里插入图片描述
在这里插入图片描述
警告消失
在这里插入图片描述

发布了46 篇原创文章 · 获赞 3 · 访问量 7631

猜你喜欢

转载自blog.csdn.net/qq_43604667/article/details/100531586