Wiki source code of Installing database drivers


Show last authors
1 {{figure image="tomcat_lib_directory.png"}}
2 The lib folder in the Tomcat installation directory contains all jar files that should be loaded automatically on startup.
3 {{/figure}}
4
5 {{figure image="tomcat_copy_driver.png"}}
6 Copy the jar of the database driver to the lib folder and restart the server.
7 {{/figure}}
8
9 You need to install the appropriate database driver first. See [[database drivers>>doc:Formcycle.SystemSettings.DatabaseDrivers]] for more details on how to get the drivers. This page illustrates how to install the database driver for Tomcat, using MySQL as an example. The procedure is similar for other database management systems.
10
11 {{info}}Only one driver may be installed per database management system, even if some (e.g. Microsoft SQL Server) offer several suitable drivers.{{/info}}
12
13 The database driver is a jar file named, for example, //apache-tomcat/lib/mysql-connector-java-5.1.46.jar//. This file needs to be copied to the //lib// directory of your Tomcat installation. All jar files in that directory are picked up by Tomcat automatically.
14
15 The Tomcat installation directory looks as follows:
16
17 * apache-tomcat
18 ** bin
19 ** conf
20 ** lib
21 ** logs
22 ** webapps
23 ** ...
24
25 You need to copy the database driver to the library directory, so that the file //apache-tomcat/lib/mysql-connector-java-5.1.46.jar// exists. Restart the server and the driver is available [[and can be selected>>doc:Formcycle.SystemSettings.UserInterface.Database]].