Thanks Stuart.
I always do this when I use JDBC in normal application.
But during configing the Tomcat Server.XML, there is no instruction about
separated properties for this "REALM".

Regards

----- Original Message ----- 
From: "Stuart MacPherson" <[EMAIL PROTECTED]>
To: "'Tomcat Users List'" <[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>; "'Emmanuel G. Dialynas'" <[EMAIL PROTECTED]>
Sent: Sunday, August 03, 2003 7:12 PM
Subject: RE: HELP!! TOMCAT and MYSQL


Split the user and pass off of the URL, and into separate properties...
stu


-----Original Message-----
From: engp0510 [mailto:[EMAIL PROTECTED]
Sent: 03 August 2003 11:40
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]; Emmanuel G.
Dialynas
Subject: Re: HELP!! TOMCAT and MYSQL

Thanks very much!
Y, I have tried. But always throw org.xml.sax.SAXParseException said a ";"
is needed to end the quote of  "password".
Any advice?


----- Original Message ----- 
From: "Emmanuel G. Dialynas" <[EMAIL PROTECTED]>
To: "engp0510" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>
Sent: Sunday, August 03, 2003 6:07 PM
Subject: Re: HELP!! TOMCAT and MYSQL


Try:


connectionURL="jdbc:mysql://localhost/authority?user=leeson&password=xxxx"



At 04:32 ìì 03/08/03 +0800, engp0510 wrote:
>Hi,
>  I am using Tomcat 4.0 and MySQL 4.0.14 on WIn2K Professional.
>In Server.XML of Tomcat, I use:
>
>  <Realm  className="org.apache.catalina.realm.JDBCRealm" debug="99"
>              driverName="org.gjt.mm.mysql.Driver"
>
>connectionURL="jdbc:mysql://localhost/authority?user=leeson;password=xxxx"
>              userTable="users" userNameCol="user_name"
> userCredCol="user_pass"
>           userRoleTable="user_roles" roleNameCol="role_name" />
>
>In MySQL, I set all user must access database with password and grant user
>'leeson' with all privileges @ localhost. I can use leeson and password to
>log into
>MySQL. All setting of MySQL will work well when I login MySQL using CMD on
>Win2K
>
>But when I start tomcat-standalone, there is always  :
>
>Catalina.start: LifecycleException:  Exception opening database connection:
>java.sql.SQLException: Invalid authorizatio
>n specification: Access denied for user: 'leeson;[EMAIL PROTECTED]' (Using
>password: NO)
>LifecycleException:  Exception opening database connection:
>java.sql.SQLException: Invalid authorization specification:
>  Access denied for user: 'leeson;[EMAIL PROTECTED]' (Using password: NO)
>        ...
>
>So, it seem Parser regard user as "leeson;password", not "leeson". But if
>I grant leeson all privileges but without password, the tomcat could work.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to