org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.exceptions.PersistenceException: ### Error querying database. Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Failed to obtain JDBC Connection; nested exception is java.sql.SQLException: null, message from server: "Host 'DESKTOP-HOINEH5' is not allowed to connect to this MySQL server" ### The error may exist in file [D:\IdeaProjects\chinaunicom-ruijin-lrc\target\classes\mapper\mysql\video\SysEquipmentInfoMapper.xml] ### The error may involve com.chinaunicom.ruijin.dao.video.ISysEquipmentInfoDao.getAllBuildingAxis ### The error occurred while executing a query ### Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Failed to obtain JDBC Connection; nested exception is java.sql.SQLException: null, message from server: "Host 'DESKTOP-HOINEH5' is not allowed to connect to this MySQL server"这个是什么异常
时间: 2024-03-28 14:38:50 浏览: 305
Mybatis报错: org.apache.ibatis.exceptions.PersistenceException解决办法
这是一个 MyBatis 的系统异常,通常是由于无法连接到数据库导致的。具体来说,这个异常信息中包含了两个错误提示,第一个是“Failed to obtain JDBC Connection”,表示无法连接到数据库,第二个是“Host 'DESKTOP-HOINEH5' is not allowed to connect to this MySQL server”,表示数据库服务器拒绝了来自指定客户端的连接请求。要解决这个异常,需要检查数据库连接参数是否正确,并确保数据库服务器允许来自该客户端的连接请求。可以尝试使用正确的数据库连接参数重新连接数据库,或者检查数据库服务器的访问控制列表,确保允许来自该客户端的连接请求。
阅读全文