Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

These instructions will help you connect TermWeb to a MySQL database.

...

  1. Edit <tomcat-install>/conf/context.xml.

     

  2. Within the Context tags, insert the DataSource Resource tag:

    <Resource name="jdbc/TermWebDS"
      auth="Container"
      type="javax.sql.DataSource"
      username="termwebuser"
      password="termwebpwd"
      driverClassName="com.mysql.jdbc.Driver"
      url="jdbc:mysql://localhost/termweb?autoReconnect=true&amp;useUnicode=true&amp;characterEncoding=utf8&amp;rewriteBatchedStatements=true"
      maxTotal="20"
      maxIdle="10"
    minIdle="2"
    testWhileIdle="true"
      validationQuery="Select 1"/>

     

    • If MySQL does not run on the same server as Tomcat, replace localhost in url with the name of the database server
    • If you named the database something else than termweb, replace termweb in url with your database name 
    • Replace termwebuser and termwebpwd in url with your database user and password.

     

    Warning
    titlePlease note

    Changes to <tomcat-install>/conf/context.xml can cause Tomcat to restart automatically

     


    Include Page
    Tomcat Data Source Configuration Properties
    Tomcat Data Source Configuration Properties

...