[求助]php能连mysql,jdbc连不上mysql,请大侠帮忙看看 _MySQL, Oracle及数据库讨论区_Weblogic技术|Tuxedo技术|中间件技术|Oracle论坛|JAVA论坛|Linux/Unix技术|hadoop论坛_联动北方技术论坛  
网站首页 | 关于我们 | 服务中心 | 经验交流 | 公司荣誉 | 成功案例 | 合作伙伴 | 联系我们 |
联动北方-国内领先的云技术服务提供商
»  游客             当前位置:  论坛首页 »  自由讨论区 »  MySQL, Oracle及数据库讨论区 »
总帖数
1
每页帖数
101/1页1
返回列表
0
发起投票  发起投票 发新帖子
查看: 2302 | 回复: 0   主题: [求助]php能连mysql,jdbc连不上mysql,请大侠帮忙看看         下一篇 
wzj
注册用户
等级:新兵
经验:67
发帖:64
精华:0
注册:2011-11-15
状态:离线
发送短消息息给wzj 加好友    发送短消息息给wzj 发消息
发表于: IP:您无权察看 2014-12-18 16:11:54 | [全部帖] [楼主帖] 楼主

    平台:bsd6.2+diable jdk1.5 +mysql 4.1+hibernate3.2+c3p0 php能连mysql,jdbc死活连不上mysql,请大侠帮忙看看
代码是经过本地window开发环境测试的。

Jul 9, 2008 2:16:34 AM com.mchange.v2.log.MLog <clinit>
INFO: MLog clients using java 1.4+ standard logging.
Jul 9, 2008 2:16:34 AM com.mchange.v2.c3p0.C3P0Registry banner
INFO: Initializing c3p0-0.9.1-pre9 [built 23-September-2006 01:47:24; debug? true; trace: 10]
Jul 9, 2008 2:16:34 AM com.mchange.v2.c3p0.impl.AbstractPoolBackedDataSource getPoolManager
INFO: Initializing c3p0 pool... com.mchange.v2.c3p0.PoolBackedDataSource@8099f75a [ connectionPoolDataSource -> com.mchange.v2.c3p0.WrapperConnectionPoolDataSource@a7857b78 [ acquireIncrement -> 1, acquireRetryAttempts -> 30, acquireRetryDelay -> 1000, autoCommitOnClose -> false, automaticTestTable -> null, breakAfterAcquireFailure -> false, checkoutTimeout -> 0, connectionCustomizerClassName -> null, connectionTesterClassName -> com.mchange.v2.c3p0.impl.DefaultConnectionTester, debugUnreturnedConnectionStackTraces -> false, factoryClassLocation -> null, forceIgnoreUnresolvedTransactions -> false, identityToken -> 26f9e5, idleConnectionTestPeriod -> 18000, initialPoolSize -> 30, maxAdministrativeTaskTime -> 0, maxConnectionAge -> 0, maxIdleTime -> 0, maxIdleTimeExcessConnections -> 0, maxPoolSize -> 30, maxStatements -> 0, maxStatementsPerConnection -> 0, minPoolSize -> 30, nestedDataSource -> com.mchange.v2.c3p0.DriverManagerDataSource@a010c661 [ description -> null, driverClass -> null, factoryClassLocation -> null, identityToken -> 5b675e, jdbcUrl -> jdbc:mysql://localhost:3306/inlife?autoReconnect=true&useUnicode=true&characterEncoding=gbk&mysqlEncoding=gbk, properties -> {user=******, password=******} ], preferredTestQuery -> null, propertyCycle -> 0, testConnectionOnCheckin -> false, testConnectionOnCheckout -> false, unreturnedConnectionTimeout -> 0, usesTraditionalReflectiveProxies -> false; userOverrides: {} ], dataSourceName -> null, factoryClassLocation -> null, identityToken -> 16877f8, numHelperThreads -> 3 ]
Jul 9, 2008 2:16:54 AM com.mchange.v2.async.ThreadPoolAsynchronousRunner$DeadlockDetector run
WARNING: com.mchange.v2.async.ThreadPoolAsynchronousRunner$DeadlockDetector@1263db -- APPARENT DEADLOCK!!! Creating emergency threads for unassigned pending tasks!
Jul 9, 2008 2:16:54 AM com.mchange.v2.async.ThreadPoolAsynchronousRunner$DeadlockDetector run
WARNING: com.mchange.v2.async.ThreadPoolAsynchronousRunner$DeadlockDetector@1263db -- APPARENT DEADLOCK!!! Complete Status:
Managed Threads: 3
Active Threads: 3
Active Tasks:
com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@1389b3f (com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#0)
com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@158689a (com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#1)
com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@13b5a3a (com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#2)
Pending Tasks:
com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@1a0b53e
com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@1dafb4e
com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@1a8d460
com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@10f0625
com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@15c97e4
com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@1f8247d
com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@23bdd1
com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@830122
com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@bf7916
com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@a6af6e
com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@1478a2d
com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@1c09624
com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@c1186f
com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@12b3349
com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@134263a
com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@b9b8d0
com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@1148603
com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@6a63d3
com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@bfed5a
com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@77eb97
com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@10c3a08
com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@1b6235b
com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@cb42cf
com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@8f2ca6
com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@1bc4ec8
com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@1d840d9
com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@898540
Pool thread stack traces:
Thread[com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#0,5,main]
java.net.PlainSocketImpl.socketConnect(Native Method)
java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
java.net.Socket.connect(Socket.java:516)
java.net.Socket.connect(Socket.java:466)
java.net.Socket.<init>(Socket.java:366)
java.net.Socket.<init>(Socket.java:20
com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:147)
com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:276)
com.mysql.jdbc.Connection.createNewIO(Connection.java:2769)
com.mysql.jdbc.Connection.<init>(Connection.java:1531)
com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:266)
com.mchange.v2.c3p0.DriverManagerDataSource.getConnection(DriverManagerDataSource.java:135)
com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:182)
com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:171)
com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.acquireResource(C3P0PooledConnectionPool.java:129)
com.mchange.v2.resourcepool.BasicResourcePool.doAcquire(BasicResourcePool.java:862)
com.mchange.v2.resourcepool.BasicResourcePool.access$700(BasicResourcePool.java:33)
com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask.run(BasicResourcePool.java:1527)
com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:547)
Thread[com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#1,5,main]
java.net.PlainSocketImpl.socketConnect(Native Method)
java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
java.net.Socket.connect(Socket.java:516)
java.net.Socket.connect(Socket.java:466)
java.net.Socket.<init>(Socket.java:366)
java.net.Socket.<init>(Socket.java:20
com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:147)
com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:276)
com.mysql.jdbc.Connection.createNewIO(Connection.java:2769)
com.mysql.jdbc.Connection.<init>(Connection.java:1531)
com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:266)
com.mchange.v2.c3p0.DriverManagerDataSource.getConnection(DriverManagerDataSource.java:135)
com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:182)
com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:171)
com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.acquireResource(C3P0PooledConnectionPool.java:129)
com.mchange.v2.resourcepool.BasicResourcePool.doAcquire(BasicResourcePool.java:862)
com.mchange.v2.resourcepool.BasicResourcePool.access$700(BasicResourcePool.java:33)
com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask.run(BasicResourcePool.java:1527)
com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:547)
Thread[com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#2,5,main]
java.net.PlainSocketImpl.socketConnect(Native Method)
java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
java.net.Socket.connect(Socket.java:516)
java.net.Socket.connect(Socket.java:466)
java.net.Socket.<init>(Socket.java:366)
java.net.Socket.<init>(Socket.java:20
com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:147)
com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:276)
com.mysql.jdbc.Connection.createNewIO(Connection.java:2769)
com.mysql.jdbc.Connection.<init>(Connection.java:1531)
com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:266)
com.mchange.v2.c3p0.DriverManagerDataSource.getConnection(DriverManagerDataSource.java:135)
com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:182)
com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:171)
com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.acquireResource(C3P0PooledConnectionPool.java:129)
com.mchange.v2.resourcepool.BasicResourcePool.doAcquire(BasicResourcePool.java:862)
com.mchange.v2.resourcepool.BasicResourcePool.access$700(BasicResourcePool.java:33)
com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask.run(BasicResourcePool.java:1527)
com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:547)


cp30版本我能换的都换过 至少换过4个版本
mysql4.1 的java驱动 3.1  5.x能下的我都换过。都是一样的错误。
郁闷的是我的php居然能连mysql。
为何jdbc就不能连上呢??

--转自 北京联动北方科技有限公司




赞(0)    操作        顶端 
总帖数
1
每页帖数
101/1页1
返回列表
发新帖子
请输入验证码: 点击刷新验证码
您需要登录后才可以回帖 登录 | 注册
技术讨论