Date sent:      Wed, 19 Sep 2007 00:26:04 -0400
From:   Fredy Provoste <[EMAIL PROTECTED]>
Subject:        Question about JNDI + Connection Pool + Mysql (Tomcat 6)
To:     Tomcat User List <users@tomcat.apache.org>
Send reply to:  Tomcat Users List <users@tomcat.apache.org>

> Hi again, i've been deployed a webapp called "libreria" in Tomcat 6, i
> tried to configure a mysql connection pool, so in the path
> 
> libreria
> .
> .........  META-INF/context.xml
> 
> put the lines
> 
> <Context path="/libreria" docBase="libreria"  debug="5"
> privileged="true" reloadable="true">
> 
> <Resource name="jdbc/basededatos" auth="Container" type="
> com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource"
> factory="com.mysql.jdbc.jdbc2.optional.MysqlDataSourceFactory"
> driverClassName="com.mysql.jdbc.Driver"  username="usuarioweb"
> password="usuarioweb"
> url="jdbc:mysql://localhost:3306/prueba1?autoReconnect=true"/>
> 
> </Context>
> 
> 
> 
> in  the path
> 
> libreria
> .
> ............WEB-INF/web.xml
> 
> the lines to use the JNDI resource
> 
> 
> <resource-ref>
>       <description>
>         Pool a la Base de Datos
>       </description>
>       <res-ref-name>
>         jdbc/basededatos
>       </res-ref-name>
>       <res-type>
>         com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource
>       </res-type>
>       <res-auth>
>         Container
>       </res-auth>
>   </resource-ref>
> 
> 
> so trying using JSTL, and pure JSP to access the pool, i get the next
> message
> 
> ERROR java.sql.SQLException: Access denied for user ''@'localhost'
> (using password: YES) seems like tomcat ignores my user i've created
> in mysql server (I verify the connection through dreamweaver conection
> feature and it works)
> 

That error is from mysql server and it doesn't mean that the password that was 
used was 
"YES"  it just means that a password was used. The password that was used will 
not be 
logged.

Make sure you have an account on mysql server as 
[EMAIL PROTECTED]

which is different than

usuarioweb@'%'

Test it by loggin in from local machine.

-Steve O.




> thanks for any help
> 
> Fredy
> 



---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to