Monday, April 8, 2013

Configure MySQL jdbc resource


  1. Copy the MySQL jdbc driver (jar file) in Glassfish lib directory and restart Glassfish
  2. In the glassfish administration console (site) go to Resources\JDBC\JDBC ConnectionPools
  3. Create a new pool of type javax.sql.DataSource and choose MySQL as the database vendor
  4. Fill in: server, user, password, database and, very important, check the URL to contain the database name (for some reason or under some circumstances it is not correctly filled in)
  5. Try Ping, should be successfull
  6. Now create the jdbc Resource, etc

1 comment :