Hi Matthias,

When trying the connection manually you're connecting as 
[EMAIL PROTECTED] and not [EMAIL PROTECTED] In mysql there is a 
distinction between those two categories. It's possible that the user 
does has rights from any host (which means any host except localhost in 
mysql) and not localhost. I suggest you try that out.

Good luck,
Ivo

Matthias wrote:
> Hi,
>
> I tried now to setup webical but I failed.
> My system is FreeBSD 7 with tomcat 6.0.14, mysql-connector-java-5.1.6
> and diablo-jdk-1.5.0.07.01_9 installed.
> I created a symlink for the mysql-connector in the directory apache-
> tomcat-6.0/lib
>    0 lrwxr-xr-x  1 root  wheel       54 Apr  7 19:17 mysql-connector-
> java.jar -> /usr/local/share/java/classes/mysql-connector-java.jar
>
> Then I created a database webical and created a user webical which can
> access that database (with a different password like in the
> documentation).
> Then I imported the two sql files into the database so that the tables
> are created and the first user for authentification is created (there
> I changed the username and password, like in the manual described).
> Tested with the tool mysql if the user can connect with the password
> to that database and everything works fine.
>
> Then I deployed the webical.war with the tomcat manager interface and
> edited the file webical/META-INF/context.xml to use the correct
> password.
>         <Realm className="org.apache.catalina.realm.JDBCRealm"
>                 debug="4"
>                 driverName="com.mysql.jdbc.Driver"
>                 connectionName="webical"
>                 connectionPassword="deleted here"
>                 connectionURL="jdbc:mysql://localhost:3306/webical?
> autoReconnect=true"
>                 userTable="_auth_user"
>                 userNameCol="username"
>                 userCredCol="userpass"
>                 userRoleTable="_auth_userrole"
>                 roleNameCol="role"/>
>         <Resource
>                 name="jdbc/calendarDataBase"
>                 auth="Container"
>                 type="javax.sql.DataSource"
>  
> factory="org.apache.tomcat.dbcp.dbcp.BasicDataSourceFactory"
>                 username="webical"
>                 password="deleted here"
>                 driverClassName="com.mysql.jdbc.Driver"
>                 url="jdbc:mysql://localhost:3306/webical?
> autoReconnect=true" />
>
> Then I restarted my tomcat that everything will be loaded freshly, but
> I got a lot of error lines in log/webical.log, I think the important
> ones are:
>         at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:
> 288)
>         at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:
> 413)
> Caused by:
> com.mysql.jdbc.exceptions.MySQLNonTransientConnectionException: Could
> not create connection to database server. Attempted reconnect 3 times.
> Giving up.
>         at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:
> 980)
>         at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:
> 956)
>         at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:
> 926)
>         at
> com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2253)
>         at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:
> 718)
>         at
> com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:298)
>         at
> com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:
> 282)
>         at
> org.apache.tomcat.dbcp.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:
> 38)
>         at
> org.apache.tomcat.dbcp.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:
> 294)
>         at
> org.apache.tomcat.dbcp.dbcp.BasicDataSource.validateConnectionFactory(BasicDataSource.java:
> 1247)
>         at
> org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:
> 1221)
>         ... 45 more
> Caused by: java.sql.SQLException: Access denied for user
> 'webical'@'localhost' (using password: YES)
>         at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:
> 1055)
>         at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:
> 956)
>         at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3491)
>         at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3423)
>         at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:910)
>         at com.mysql.jdbc.MysqlIO.secureAuth411(MysqlIO.java:3923)
>         at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:1273)
>         at
> com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2181)
>         ... 52 more
> 2008-04-08 17:24:50,224 WARN  JDBCExceptionReporter - SQL Error: 0,
> SQLState: null
>
>
> It looks like it cannot access the database, but username, password,
> database everything looks fine in that file.
> Do you have an idea how to solve that problem?
>
> Best regards,
> Matthias
> >
>   


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"webical-developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/webical-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to