org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is java.sql.SQLException: Access denied for user ''@' ' (using password: YES)
解决办法:
grant all PRIVILEGES on database.* to root@'192.168.5.115' identified by '123456';
database ---你要开放权限的数据库,
192.168.5.115 ---你允许访问的ip
123456 ----- 数据库密码
解决办法:
grant all PRIVILEGES on database.* to root@'192.168.5.115' identified by '123456';
database ---你要开放权限的数据库,
192.168.5.115 ---你允许访问的ip
123456 ----- 数据库密码
本文介绍了一种常见的Spring框架中出现的org.springframework.jdbc.CannotGetJdbcConnectionException异常及其解决方案。该异常通常由数据库访问权限不足引起。文章提供了一个具体的grant命令示例,用于为指定IP地址的用户分配所有数据库权限。

9万+

被折叠的 条评论
为什么被折叠?



