解决 Could not create connection to database server.

前段时间在做一个springboot小项目时遇到了一个问题:
利用mybatis进行逆向工程创建pojo和mapper时,出现 Could not create connection to database server. 报错。
检查自己的url语句并没有错误,数据库的用户名和密码也都正确。

然后我查了一下发现是因为我的mysqll版本号和maven中pom文件中配置的mysql-connector版本号不同在将pom文件中的版本号改成本地mysql的版本号以后再更新maven问题解决

小tips:

1.如何知道自己的mysql版本号:
在任何一个能执行sql语句的地方执行语句:select version() from dual;
它就会返回一个版本号

2.如果这个方法不好使,可以试试将mysql驱动名改成:com.mysql.cj.jdbc.Driver

[已解决] Could not create connection to database server.相关推荐

  1. mysql-mybatis 8.0版本配置====解决could not create connection to database server.

    8.0版本有两个改动 1.jdbc的驱动必须设置为com.mysql.cj.jdbc.Driver 2.指定时区 serverTimezone=GMT%2B8 jdbc.driver=com.mysq ...

  2. [08001] Could not create connection to database server. Attempted reconnect 3 times. Giving up.解决办法

    pycharm中database连接MySQL数据库时出现如下提示: [08001] Could not create connection to database server. Attempted ...

  3. could not create connection to database server.] with root cause

    场景 SpringBoot项目运行后提示: 详细提示如下: ### Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: ...

  4. MySql :Could not create connection to database server.

    错误: Exception in thread "main" org.apache.ibatis.exceptions.PersistenceException:Error que ...

  5. Connection to @localhost failed. [08001] Could not create connection to database server. Attempt

    Connection to @localhost failed. [08001] Could not create connection to database server. Attempt 当我们 ...

  6. JAVA——[MySQLNonTransientConnectionException:Could not create connection to database server.]解决方案

    问题描述 com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Could not create connecti ...

  7. JAVA.SQL.SQLNONTRANSIENTCONNECTIONEXCEPTION: COULD NOT CREATE CONNECTION TO DATABASE SERVER. ATTEMPT

    错误信息 java.sql.SQLNonTransientConnectionException: Could not create connection to database server. At ...

  8. nacos连接mysql出现:Could not create connection to database server. Attempted reconnect 3 times. Giving u

    nacos连接mysql出错 今天在学习nacos的时候,在从nacos内嵌数据derby切换到mysql的时候,出现一个错误,特意记一下. org.springframework.jdbc.Cann ...

  9. 数据库连接失败: Could not create connection to database server. Attempted reconnect 3 times. Giving up.

    数据库连接失败信息摘要: ERROR-com.alibaba.druid.pool.DruidDataSource init:927: init datasource error,url: jdbc: ...

  10. [08001] Could not create connection to database server. Attempted reconnect 3 times.

    现象描述: 在JetBrains的系列产品中,database连接MySQL数据库时,如Idea.DataGrip.GoLand.Pycharm 等等,连接MySQL数据库时会出现如下提示: 连接失败 ...

最新文章

  1. InfluxDB 2.0 Alpha展开测试!将会加入查询语言Flux
  2. OnCheckedChanged的触发需要AutoPostBack=true
  3. 安装Ubuntu 14.04后要做的5件事情
  4. Metasploit新增技巧提示功能
  5. SAP Business Application Studio的权限控制
  6. python for循环九九乘法表_python3:使用for循环打印九九乘法表
  7. 常用的表单正则表达式
  8. oracle数据库报错: ORA-00257: archiver error. Connect internal only, until freed 错误的处理方法
  9. 使用jQuery的插件qrcode生成二维码(静态+动态生成)及常见问题解决方法
  10. python print_Python print()
  11. MySQL的主从复制与读写分离技术实例(一)主从复制
  12. mahout推荐15-在hadoop上运行MapReduce
  13. squid笔记下载_Squid下载-Squid鱿鱼笔记下载v3.4.9.5 安卓版-西西软件下载
  14. java做http接口
  15. 如果开发“科技”一查通小程序软件查询添加剂信息是否有前途呢?
  16. GetLastError错误码
  17. SQL sever2008 r2安装闪退的解决办法
  18. cannot be resolved解决方法
  19. 2021杭电计算机考研经验帖
  20. Clock skew too great(37)-PREAUTH_FAILED

热门文章

  1. 分布式事务-LCN解决分布式事务
  2. matlab人口数据,matlab中国人口
  3. 1004-史丰收速算
  4. java接入支付宝api实现支付宝手机扫码登录
  5. mysql:Prepared statement needs to be re-prepared
  6. GitHub 上史上最全的 iOS 开源项目分类汇总
  7. 百度世界2020技术“大阅兵”背后的营销战役
  8. xray安全漏洞检测(高效能)
  9. 专升本英语:可数名词变复数规则
  10. python生成图像公章_仿真印章制作——三种方法