- 小结
- 问题及解决
- 访问MySQL数据库的问题
- 缺少jar包
- 地址已经被占用
- 参考
配置Spring +Struts + Hibernate + MySQL碰到的几个问题,并解决。
问题及解决 访问MySQL数据库的问题返回错误:java.sql.SQLException: Access denied for user 'root '@‘localhost’ (using password: YES)
发现MySQL没有开放远程访问权限,解决:
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'password';
对于MariaDB修改密码需要以下指令:
UPDATe user SET authentication_string=password('P@ssw0rd') WHERe user='root'缺少jar包
返回错误:Caused by: Cannot locate the chosen ObjectFactory implementation: spring - [unknown location]
缺少struts2-spring-plugin-x.x.x.x.jar包,添加到工程里就行。
地址已经被占用返回: java.net.BindException: Address already in use: JVM_Bind :80
需要找到进程,并关掉进程,就不会冲突了。
netstat -oan | find "80" taskkill /F /PID xxxx参考
Caused by: Cannot locate the chosen ObjectFactory implementation: spring - [unknown location]
java.net.BindException: Address already in use: JVM_Bind :80
MySQL Error: : 'Access denied for user ‘root’@‘localhost’
解决无法获取数据库连接 java.sql.SQLException: Connections could not be acquired from the underlying database
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)