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]