1、使用MyBatis 连接数据库报错
org.apache.ibatis.exceptions.PersistenceException:
### Error updating database. Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Could not create connection to database server.
### The error may exist in mappers/UserMapper.xml
### The error may involve com.atguigu.mybatis.mapper.UserMapper.insertUser
### The error occurred while executing an update
### Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Could not create connection to database server.
2、我这边的错误原因是:数据库和驱动的版本不一致
版本一致后就可以运行成功了