首页
学习
活动
专区
工具
TVP
发布
社区首页 >问答首页 >springboot怎么连接腾讯云的mysql和redis?

springboot怎么连接腾讯云的mysql和redis?

提问于 2018-12-30 19:52:20
回答 1关注 0查看 1.2K

连接本地的成功,部署的时候我把端口改成腾讯,部署以后连接不成功。下面是配置文件,我是不是少配置东西了?新手求解答

代码语言:javascript
复制
datasource:
  driverClassName: com.mysql.jdbc.Driver
  url: jdbc:mysql//(ip地址):3306/user?characterEncoding=utf8
  username: root
  password: (腾讯的密码)
redis:
  host: 172.21.0.4
  port: 6379
  password: (密码)

他们都在同一个私有网络里。

报错

org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.exceptions.PersistenceException: \n### Error querying database. Cause: java.lang.RuntimeException: Driver com.mysql.jdbc.Driver claims to not accept jdbcUrl, jdbc:mysql//172.21.32.6:3306/user?characterEncoding=utf8\n### The error may exist in class path resource [com/gzhdexiaowo/user/mapper/UserMapper.xml]\n### The error may involve com.gzhdexiaowo.user.mapper.UserMapper.selectByExample\n### The error occurred while executing a query\n### Cause: java.lang.RuntimeException: Driver com.mysql.jdbc.Driver claims to not accept jdbcUrl, jdbc:mysql//172.21.32.6:3306/user?characterEncoding=utf8

相关文章

相似问题

相关问答用户
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档