Hi, Dollar sign in password is a no-no right now. It gets escaped. It's a PITA to fix, so I (and apparently others) haven't done it yet. If you really want a dollar sign in your password, submit a patch ;)
Yoav Shapira http://www.yoavshapira.com >-----Original Message----- >From: e-Denton Subscriber [mailto:[EMAIL PROTECTED] >Sent: Tuesday, October 26, 2004 11:04 AM >To: Tomcat Users List >Subject: MySQL upgrade Problem > >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: '[EMAIL PROTECTED]' (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: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
