tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "e-Denton Subscriber" <subscri...@e-denton.com>
Subject MySQL upgrade Problem
Date Tue, 26 Oct 2004 15:03:52 GMT
Hi,

I just upgraded from MySql 3.x to 4.0 and now I can't make connections work
from Tomcat. I have read a bunch of stuff on the Web about this or similar
problems, but, even though it worked before,  I can't make it work now.

I specify my connection info in server.xml and context.xml just like I used
to (below). The only difference is (?) the new MySql, and the fact that I am
trying to use a new, different password (with a dollar sign in it). (Oh,
and, I set appBase outside the Tomcat home directory.)  On Tomcat startup, I
get:

"JDBCRealm[Catalina]:
Exception opening database connection
java.sql.SQLException: Invalid authorization specification: Access denied
for user: 'xxx@localhost' (Using password: YES)
at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:659)..."

I can login manually to MySql using the same user and password.
I can access the database directly from Java programs which make their own
connection.

Any ideas what's going wrong?

web.xml:
---------
 <Realm className="org.apache.catalina.realm.JDBCRealm"
    debug="99"
    driverName="com.mysql.jdbc.Driver"
    connectionURL="jdbc:mysql://127.0.0.1:3306/xxx"
    connectionName="yyy"
    connectionPassword="$zzz"
    userTable="portal_user"
     userNameCol="clientName"
     userCredCol="clientPassword"
    userRoleTable="portal_role"
     roleNameCol="clientRole"
    digest="md5" />

conext.xml:
-----------
   <Resource name="jdbc/portal" auth="Container"
type="javax.sql.DataSource"/>

    <ResourceParams name="jdbc/portal">
  <parameter>
   <name>factory</name>
   <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
  </parameter>
        <parameter>
            <name>username</name>
            <value>yyy</value>
        </parameter>
        <parameter>
            <name>password</name>
            <value>$zzz</value>
        </parameter>
        <parameter>
            <name>driverClassName</name>
            <value>com.mysql.jdbc.Driver</value>
        </parameter>
        <parameter>
            <name>url</name>

<value>jdbc:mysql://127.0.0.1:3306/xxx?autoReconnect=true</value>
        </parameter>
        <parameter>
            <name>maxActive</name>
            <value>10</value>
        </parameter>
        <parameter>
            <name>maxIdle</name>
            <value>5</value>
        </parameter>
  <parameter>
   <name>maxWait</name>
   <value>10000</value>
  </parameter>
    </ResourceParams>




---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message