Linux主机连接不上MySql,但是在外网都能访问

老腊肉 发布于 2013/06/06 23:52
阅读 4K+
收藏 0

问题:

1、Linux服务器上的MySql5.5数据库已经可以在外网连接与使用

    在服务器上也可以使用mysql -u root -p来进行登陆的时候,和使用数据库sms账户也可以使用mysql -u sms -p ,均发现此问题:

[root@localhost logs]# mysql -u root -p -A
Enter password:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)

我配置/etc/my.cnf后已解决(如下配置):

[client]

socket=/var/lib/mysql/mysql.sock

2、在我自己的笔记本连接服务器,是可以直接用配置来进行连接的,也可以查询到数据。

3、就是到了服务器上,则出现如下问题。。。。求各位大牛帮忙看看。是不是配置出了问题

4、use mysql ; select * from user 如下:

mysql> select host, user from user where User = 'sms';
+-----------------------+------+
| host                  | user |
+-----------------------+------+
| %                     | sms  |
| localhost             | sms  |
| localhost.localdomain | sms  |
+-----------------------+------+
3 rows in set

 

装载SpringUtil成功 -->contextPath=/opt/server/apache-tomcat-5.5.30/webapps/sp/
[INFO ] 2013-06-06 23:42:17 :Initializing c3p0 pool... com.mchange.v2.c3p0.ComboPooledDataSource [ acquireIncrement -> 3, acquireRetryAttempts -> 3, acquireRetryDelay -> 1000, autoCommitOnClose -> false, automaticTestTable -> null, breakAfterAcquireFailure -> true, checkoutTimeout -> 0, connectionCustomizerClassName -> null, connectionTesterClassName -> com.mchange.v2.c3p0.impl.DefaultConnectionTester, dataSourceName -> z8kflt8v798ch2a8tyu1|1e2afb2, debugUnreturnedConnectionStackTraces -> false, description -> null, driverClass -> com.mysql.jdbc.Driver, factoryClassLocation -> null, forceIgnoreUnresolvedTransactions -> false, identityToken -> z8kflt8v798ch2a8tyu1|1e2afb2, idleConnectionTestPeriod -> 60, initialPoolSize -> 2, jdbcUrl -> jdbc:mysql://localhost:3306/smstest?useUnicode=true&characterEncoding=utf8, maxAdministrativeTaskTime -> 0, maxConnectionAge -> 0, maxIdleTime -> 1800, maxIdleTimeExcessConnections -> 0, maxPoolSize -> 50, maxStatements -> 0, maxStatementsPerConnection -> 0, minPoolSize -> 5, numHelperThreads -> 3, numThreadsAwaitingCheckoutDefaultUser -> 0, preferredTestQuery -> null, properties -> {user=******, password=******}, propertyCycle -> 0, testConnectionOnCheckin -> false, testConnectionOnCheckout -> false, unreturnedConnectionTimeout -> 0, usesTraditionalReflectiveProxies -> false ]
   [WARN ] 2013-06-06 23:42:19 :com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@ad483 -- Acquisition Attempt Failed!!! Clearing pending acquires. While trying to acquire a needed new resource, we failed to succeed more than the maximum number of allowed acquisition attempts (3). Last acquisition attempt exception:
   com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Could not create connection to database server.
 at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
 at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
 at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
 at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
 at com.mysql.jdbc.Util.handleNewInstance(Util.java:411)
 at com.mysql.jdbc.Util.getInstance(Util.java:386)
 at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1013)
 at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:987)
 at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:982)
 at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:927)
 at com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2411)
 at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2153)
 at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:792)
 at com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:47)
 at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
 at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
 at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
 at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
 at com.mysql.jdbc.Util.handleNewInstance(Util.java:411)
 at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:381)
 at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:305)
 at com.mchange.v2.c3p0.DriverManagerDataSource.getConnection(DriverManagerDataSource.java:134)
 at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:182)
 at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:171)
 at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.acquireResource(C3P0PooledConnectionPool.java:137)
 at com.mchange.v2.resourcepool.BasicResourcePool.doAcquire(BasicResourcePool.java:1014)
 at com.mchange.v2.resourcepool.BasicResourcePool.access$800(BasicResourcePool.java:32)
 at com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask.run(BasicResourcePool.java:1810)
 at com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:547)
Caused by: java.lang.NullPointerException
 at java.security.MessageDigest.update(MessageDigest.java:293)
 at java.security.MessageDigest.digest(MessageDigest.java:368)
 at com.mysql.jdbc.Security.scramble411(Security.java:329)
 at com.mysql.jdbc.MysqlIO.secureAuth411(MysqlIO.java:4087)
 at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:1308)
 at com.mysql.jdbc.ConnectionImpl.coreConnect(ConnectionImpl.java:2336)
 at com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2369)
 ... 18 more
[WARN ] 2013-06-06 23:42:19 :com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@1275a34 -- Acquisition Attempt Failed!!! Clearing pending acquires. While trying to acquire a needed new resource, we failed to succeed more than the maximum number of allowed acquisition attempts (3). Last acquisition attempt exception:
   com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Could not create connection to database server.
 at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
 at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
 at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
 at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
 at com.mysql.jdbc.Util.handleNewInstance(Util.java:411)
 at com.mysql.jdbc.Util.getInstance(Util.java:386)
 at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1013)
 at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:987)
 at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:982)
 at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:927)
 at com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2411)
 at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2153)
 at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:792)
 at com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:47)
 at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
 at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
 at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
 at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
 at com.mysql.jdbc.Util.handleNewInstance(Util.java:411)
 at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:381)
 at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:305)
 at com.mchange.v2.c3p0.DriverManagerDataSource.getConnection(DriverManagerDataSource.java:134)
 at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:182)
 at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:171)
 at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.acquireResource(C3P0PooledConnectionPool.java:137)
 at com.mchange.v2.resourcepool.BasicResourcePool.doAcquire(BasicResourcePool.java:1014)
 at com.mchange.v2.resourcepool.BasicResourcePool.access$800(BasicResourcePool.java:32)
 at com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask.run(BasicResourcePool.java:1810)
 at com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:547)
Caused by: java.lang.NullPointerException
 at java.security.MessageDigest.update(MessageDigest.java:293)
 at java.security.MessageDigest.digest(MessageDigest.java:368)
 at com.mysql.jdbc.Security.scramble411(Security.java:329)
 at com.mysql.jdbc.MysqlIO.secureAuth411(MysqlIO.java:4087)
 at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:1308)
 at com.mysql.jdbc.ConnectionImpl.coreConnect(ConnectionImpl.java:2336)
 at com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2369)
 ... 18 more
[ERROR] 2013-06-06 23:42:19 :A RESOURCE POOL IS PERMANENTLY BROKEN! [com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@1275a34]
   [WARN ] 2013-06-06 23:42:19 :com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@1f52460 -- Acquisition Attempt Failed!!! Clearing pending acquires. While trying to acquire a needed new resource, we failed to succeed more than the maximum number of allowed acquisition attempts (3). Last acquisition attempt exception:
   com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Could not create connection to database server.
 at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
 at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
 at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
 at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
 at com.mysql.jdbc.Util.handleNewInstance(Util.java:411)
 at com.mysql.jdbc.Util.getInstance(Util.java:386)
 at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1013)
 at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:987)
 at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:982)
 at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:927)
 at com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2411)
 at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2153)
 at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:792)
 at com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:47)
 at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
 at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
 at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
 at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
 at com.mysql.jdbc.Util.handleNewInstance(Util.java:411)
 at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:381)
 at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:305)
 at com.mchange.v2.c3p0.DriverManagerDataSource.getConnection(DriverManagerDataSource.java:134)
 at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:182)
 at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:171)
 at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.acquireResource(C3P0PooledConnectionPool.java:137)
 at com.mchange.v2.resourcepool.BasicResourcePool.doAcquire(BasicResourcePool.java:1014)
 at com.mchange.v2.resourcepool.BasicResourcePool.access$800(BasicResourcePool.java:32)
 at com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask.run(BasicResourcePool.java:1810)
 at com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:547)
Caused by: java.lang.NullPointerException
 at java.security.MessageDigest.update(MessageDigest.java:293)
 at java.security.MessageDigest.digest(MessageDigest.java:368)
 at com.mysql.jdbc.Security.scramble411(Security.java:329)
 at com.mysql.jdbc.MysqlIO.secureAuth411(MysqlIO.java:4087)
 at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:1308)
 at com.mysql.jdbc.ConnectionImpl.coreConnect(ConnectionImpl.java:2336)
 at com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2369)
 ... 18 more
[ERROR] 2013-06-06 23:42:19 :A RESOURCE POOL IS PERMANENTLY BROKEN! [com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@1f52460]
   [ERROR] 2013-06-06 23:42:19 :com.mchange.v2.resourcepool.BasicResourcePool@d2d58b -- Unexpectedly broken!!!
   com.mchange.v2.resourcepool.ResourcePoolException: Unexpected Break Stack Trace!
 at com.mchange.v2.resourcepool.BasicResourcePool.unexpectedBreak(BasicResourcePool.java:866)
 at com.mchange.v2.resourcepool.BasicResourcePool.access$1100(BasicResourcePool.java:32)
 at com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask.run(BasicResourcePool.java:1854)
 at com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:547)
[ERROR] 2013-06-06 23:42:19 :com.mchange.v2.resourcepool.BasicResourcePool@d2d58b -- Unexpectedly broken!!!
   com.mchange.v2.resourcepool.ResourcePoolException: Unexpected Break Stack Trace!
 at com.mchange.v2.resourcepool.BasicResourcePool.unexpectedBreak(BasicResourcePool.java:866)
 at com.mchange.v2.resourcepool.BasicResourcePool.access$1100(BasicResourcePool.java:32)
 at com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask.run(BasicResourcePool.java:1854)
 at com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:547)
[WARN ] 2013-06-06 23:42:19 :com.mchange.v2.resourcepool.BasicResourcePool@d2d58b -- close() called multiple times.
   [ERROR] 2013-06-06 23:42:19 :A RESOURCE POOL IS PERMANENTLY BROKEN! [com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@ad483]
   [INFO ] 2013-06-06 23:42:19 :com.mchange.v2.resourcepool.BasicResourcePool@d2d58b -- an attempt to checkout a resource was interrupted, because the pool is now closed. [Thread: main]
   [ERROR] 2013-06-06 23:42:19 :com.mchange.v2.resourcepool.BasicResourcePool@d2d58b -- Unexpectedly broken!!!
   com.mchange.v2.resourcepool.ResourcePoolException: Unexpected Break Stack Trace!
 at com.mchange.v2.resourcepool.BasicResourcePool.unexpectedBreak(BasicResourcePool.java:866)
 at com.mchange.v2.resourcepool.BasicResourcePool.access$1100(BasicResourcePool.java:32)
 at com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask.run(BasicResourcePool.java:1854)
 at com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:547)
[WARN ] 2013-06-06 23:42:19 :com.mchange.v2.resourcepool.BasicResourcePool@d2d58b -- close() called multiple times.
   org.springframework.transaction.CannotCreateTransactionException: Could not open JDBC Connection for transaction; nested exception is java.sql.SQLException: An SQLException was provoked by the following failure: java.lang.InterruptedException
 at org.springframework.jdbc.datasource.DataSourceTransactionManager.doBegin(DataSourceTransactionManager.java:238)
 at org.springframework.transaction.support.AbstractPlatformTransactionManager.getTransaction(AbstractPlatformTransactionManager.java:374)
 at org.springframework.transaction.interceptor.TransactionAspectSupport.createTransactionIfNecessary(TransactionAspectSupport.java:263)
 at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:101)
 at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
 at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
 at $Proxy11.selectAllThirdgwArrest(Unknown Source)
 at com.mobile.spc.cache.impl.DetainArrestCacheSpecial.resetArrestAll(DetainArrestCacheSpecial.java:191)
 at com.mobile.spc.util.SpringUtil.contextInitialized(SpringUtil.java:42)
 at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3795)
 at org.apache.catalina.core.StandardContext.start(StandardContext.java:4252)
 at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:760)
 at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:740)
 at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:544)
 at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:634)
 at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:561)
 at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:496)
 at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1203)
 at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:319)
 at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:120)
 at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1022)
 at org.apache.catalina.core.StandardHost.start(StandardHost.java:736)
 at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
 at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
 at org.apache.catalina.core.StandardService.start(StandardService.java:448)
 at org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
 at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 at java.lang.reflect.Method.invoke(Method.java:597)
 at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295)
 at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)
Caused by: java.sql.SQLException: An SQLException was provoked by the following failure: java.lang.InterruptedException
 at com.mchange.v2.sql.SqlUtils.toSQLException(SqlUtils.java:106)
 at com.mchange.v2.sql.SqlUtils.toSQLException(SqlUtils.java:65)
 at com.mchange.v2.sql.SqlUtils.toSQLException(SqlUtils.java:62)
 at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutPooledConnection(C3P0PooledConnectionPool.java:531)
 at com.mchange.v2.c3p0.impl.AbstractPoolBackedDataSource.getConnection(AbstractPoolBackedDataSource.java:128)
 at org.springframework.jdbc.datasource.DataSourceTransactionManager.doBegin(DataSourceTransactionManager.java:200)
 ... 32 more
Caused by: java.lang.InterruptedException
 at java.lang.Object.wait(Native Method)
 at com.mchange.v2.resourcepool.BasicResourcePool.awaitAvailable(BasicResourcePool.java:1315)
 at com.mchange.v2.resourcepool.BasicResourcePool.prelimCheckoutResource(BasicResourcePool.java:557)
 at com.mchange.v2.resourcepool.BasicResourcePool.checkoutResource(BasicResourcePool.java:477)
 at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutPooledConnection(C3P0PooledConnectionPool.java:525)
 ... 34 more
[INFO ] 2013-06-06 23:42:19 :Parsing configuration file [struts-default.xml]
   [INFO ] 2013-06-06 23:42:19 :Parsing configuration file [struts-plugin.xml]
   [INFO ] 2013-06-06 23:42:19 :Parsing configuration file [struts.xml]
   [INFO ] 2013-06-06 23:42:19 :Initializing Struts-Spring integration...
   [INFO ] 2013-06-06 23:42:19 :Setting autowire strategy to name
   [INFO ] 2013-06-06 23:42:19 :... initialized Struts-Spring integration successfully
   [INFO ] 2013-06-06 23:42:19 :Setting DefaultObjectTypeDeterminer as default ...
   [INFO ] 2013-06-06 23:42:19 :DWR Version 2.0.5 starting.
   [INFO ] 2013-06-06 23:42:19 :- Servlet Engine: Apache Tomcat/5.5.30
   [INFO ] 2013-06-06 23:42:19 :- Java Version:   1.6.0_16
   [INFO ] 2013-06-06 23:42:19 :- Java Vendor:    Sun Microsystems Inc.
   Jun 6, 2013 11:42:19 PM org.apache.coyote.http11.Http11BaseProtocol start
信息: Starting Coyote HTTP/1.1 on http-10008
Jun 6, 2013 11:42:19 PM org.apache.jk.common.ChannelSocket init
信息: JK: ajp13 listening on /0.0.0.0:8009
Jun 6, 2013 11:42:19 PM org.apache.jk.server.JkMain start
信息: Jk running ID=0 time=0/8  config=null
Jun 6, 2013 11:42:19 PM org.apache.catalina.storeconfig.StoreLoader load
信息: Find registry server-registry.xml at classpath resource
Jun 6, 2013 11:42:20 PM org.apache.catalina.startup.Catalina start
信息: Server startup in 4331 ms

 

数据库连接池配置如下:

 

加载中
0
几点人
几点人

请把连接池配置的localhost更改为127.0.0.1

看看效果如何

0
nathanwu
nathanwu
mysql -ucms -hlocalhost 再试一下
0
老腊肉
老腊肉

引用来自“钟晓骏”的答案

谢谢,我在命令行里面的连接是解决了,但是我Linux本机Tomcat应用依然连接不上,但是工程在自己笔记本上MyEclipse里面是可以连接上的
0
SandKing
SandKing

是不是回环网络的问题

0
linan
linan

引用来自“几点人”的答案

请把连接池配置的localhost更改为127.0.0.1

看看效果如何

建议按照这个答案试试。 
0
老腊肉
老腊肉

各位好,已经问题解决了。

原因系我的JDK位数不对,在64位操作系统下使用了32位的操作系统导致的

OSCHINA
登录后可查看更多优质内容
返回顶部
顶部