This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Soft Skills: The software developer's life manual and have John Sonmez on-line!
See this thread for details.
Win a copy of Soft Skills: The software developer's life manual this week in the Jobs Discussion forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

need help configuring MySQL

 
aliasger talib
Ranch Hand
Posts: 37
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi there,
i want to use MySQL as my database for my aplication which runs with Tomcat 4.04. the database has been created but i cant seem to get y tomcat running. ive updated the server.xml file accordingly for my tomcat.
this what i added :
<Realm className="org.apache.catalina.realm.JDBCRealm" debug="99"
driverName="org.gjt.mm.mysql.Driver"
connectionURL="jdbc:mysql://localhost:3306/dbo?user=alit;password=wrox"
userTable="users" userNameCol="username" userCredCol="password"
userRoleTable="roles" roleNameCol="role" />
it gives me an exception on start up of tomcat saying that it cant open the database connection:
Catalina.start: LifecycleException: Exception opening database connection: jav
a.sql.SQLException: org.gjt.mm.mysql.Driver
LifecycleException: Exception opening database connection: java.sql.SQLExcepti
on: org.gjt.mm.mysql.Driver
anything im doing wrong here? im really stuck people. need help ASAP.
cheers,
ali
 
Jeremy Maddera
Greenhorn
Posts: 16
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You connection URL should look like this:
connectionURL="jdbc:mysql://localhost:3306/dbo?user=alit&password=wrox"
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic