最近在做一个项目,mysql数据库是建在局域网中 同事的电脑上,在工程中配置数据库后,启动并没有报错,但是卡在:
Initializing connection provider: org.springframework.orm.hibernate3.LocalDataSourceConnectionProvider
然后tomcat一直就不动了,tomcat的progress 停留在 prepare lunch delegate 。
因为同样的工程,我同事配置的数据库IP localhost 是不报错的。 说明是数据库的问题
1,驱动配置有误:driver=com.mysql.jdbc.Driver
2,数据库连接地址有误:url=jdbc:mysql://localhost:3306/test?3useUnicode=true&characterEncoding=utf8
3,密码或帐号有误:username=root
password=root
4,数据库未启动或无权访问
5,项目未引入对应的驱动jar包mysql-connector-java-5.1.6-bin.jar
6,mysql root没有远程访问的权限,需要增加权限,增加权限的步骤如下:
进入mysql数据库:
grant all privileges on *.* to 'root'@'%' identified by 'root' with grant option;
flush privileges;
我的问题是 第四种,原因是 数据库的3306端口为对外开放。
参考以下设置:
http://jingyan.baidu.com/article/63acb44add614761fcc17ec2.html?qq-pf-to=pcqq.c2c
相关推荐
org.springframework.orm-3.0.4.RELEASE.jar org.springframework.oxm-3.0.4.RELEASE.jar org.springframework.spring-library-3.0.4.RELEASE.libd org.springframework.test-3.0.4.RELEASE.jar org.spring...
org.springframework.orm-3.0.0.M1.jar
NULL 博文链接:https://hw1287789687.iteye.com/blog/1967701
Class'org.springframework.orm.hibernate3.LocalSessionFactoryBean'not found 解决办法
org.springframework.orm.jar.zip
org.springframework.orm-3.1.RELEASE.jar org.springframework.oxm-3.1.RELEASE.jar org.springframework.spring-library-3.1.RELEASE.libd org.springframework.test-3.1.RELEASE.jar org.springframework....
org.springframework.orm-3.1.0.M2
org.springframework.beans-3.0.0.M4.jar
org.springframework.orm-3.0.0.RELEASE.jar org.springframework.oxm-3.0.0.RELEASE.jar org.springframework.test-3.0.0.RELEASE.jar org.springframework.transaction-3.0.0.RELEASE.jar org.springframework.web...
org.springframework.orm-3.0.0.M4.jar
org.springframework.orm-3.0.0.RELEASE org.springframework.oxm-3.0.0.RELEASE org.springframework.spring-library-3.0.0.RELEASE org.springframework.test-3.0.0.RELEASE org.springframework.transaction-...
org.springframework.orm-3.0.5.RELEASE.jar org.springframework.oxm-3.0.5.RELEASE.jar org.springframework.test-3.0.5.RELEASE.jar org.springframework.transaction-3.0.5.RELEASE.jar org.springframework.web...
org.springframework.orm-3.1.1.RELEASE org.springframework.oxm-3.1.1.RELEASE org.springframework.test-3.1.1.RELEASE org.springframework.transaction-3.1.1.RELEASE org.springframework.web.portlet-3.1.1....
org.springframework.instrument-3.0.5.RELEASE.jar,org.springframework.jdbc-3.0.5.RELEASE.jar,org.springframework.jms-3.0.5.RELEASE.jar,org.springframework.orm-3.0.5.RELEASE.jar,org.springframework....
<bean id="sqlMapClient" class="org.springframework.orm.ibatis.SqlMapClientFactoryBean"> <value>classpath:SqlMapConfig.xml <bean id="dao" class="org.springframework.orm.ibatis....
org.springframework.orm-3.1.0.RELEASE.jar org.springframework.oxm-3.1.0.RELEASE.jar org.springframework.test-3.1.0.RELEASE.jar org.springframework.transaction-3.1.0.RELEASE.jar org.springframework.web...
org.springframework.orm-3.0.1.jar
org.springframework.orm-3.0.2.RELEASE org.springframework.oxm-3.0.2.RELEASE org.springframework.spring-library-3.0.2.RELEASE org.springframework.test-3.0.2.RELEASE org.springframework.transaction-...
spring-hibernate3.jar包,直接导入路径即可,解决Class 'org.springframework.orm.hibernate3.LocalSessionFactoryBean' not found这个错误
<bean id="sqlMapClientTemplate" class="org.springframework.orm.ibatis.SqlMapClientTemplate"> <!-- 配置 transactionManager事物管理--> <bean id="transactionManager" class="org.springframework....