Hibernate version: 3.2
I am developing an application that talks to a MySQL database using Hibernate. This application is standalone java, no container services.
It mostly worked except that I noticed that the connections would not stay up overnight, requiring application restart.
Looking at the documentation, it seemed that I would be well-advised to use connection pooling. So I configured my application to use C3P0 with all the relevant properties. Running against my local instance of MySQL, all was well and my stale connection problem seemed solved.
As soon as I moved the application configured for C3P0 onto the development server however, No database connectivity could take place.
2008-06-10 12:04:43,221
[Task-Thread-for-com.mchange.v2.async.ThreadPerTaskAsynchronousRunner@160a26f] DEBUG resourcepool.BasicResourcePool - An exception occurred while acquiring a poolable resource. Will retry.
java.sql.SQLException: Access denied for user 'myuser'@'server.mydomain.com' (using password: YES)
My Hibernate configuration file names the user as simply myuser.
Should I instead be naming him as 'myuser'@'server.mydomain.com'? Does C3PO have a different way of putting the username together than straight Hibernate does. Or should I specifically add a user called 'myuser'@'server.mydomain.com'? to the database users table? I know mysql is finicky about this.
|