连接本地的成功,部署的时候我把端口改成腾讯,部署以后连接不成功。下面是配置文件,我是不是少配置东西了?新手求解答
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
相似问题