|
Setting up A Mysql DatabaseOverviewMySQL is a commercial database available from http://www.mysql.com Obtaining the DriverA MySQL JDBC driver is also available through http://www.mysql.com/downloads/api-jdbc.html The driver has recently had its name changed to reflect its author's new association - it is now "mysql-connector-java-{version}-bin.jar" rather than "mm.mysql-{version}-bin.jar. It can be downloaded as either a .tar.gz or .zip. The file should be stored in a directory where it will be accessible from the uPortal build environment (for example /usr/local/java/mysql/lib/mysql-connector-java-2.0.14-bin.jar) See Issues section about possible issues using this driver Properties ConfigurationThe uPortal build.properties will need to be modifed. Find the property called jdbcDriver and change it to point to the MySQL jar file, for example: jdbcDriver.jar=./lib/mm.mysql-2.0.14-bin.jar The uPortal rdbm.properties file (in the properties directory) will need to modified to specify the driver properties. First, comment out the property definitions which are currently defined (most likely, for HypersonicSQL). The rdbm.properties file contains several sample entries. Uncomment (or add) the lines for the MySQL database and make whatever changes necessary to match your local database installation, For example: #### MySQL example The dbloader.xml properties file (also in the properties directory) may also need to be modified. This file is used by the DbLoader tool to create the uPortal database tables and populate the database. It contains several sample entries which create db-type-mappings for different databases. Find the tags for an MySQL database and modify the db-version, driver-name, and driver-version as necessary. For example: <db-type-mapping> The PersonDirs.xml file (also in the properties directory) needs
to be modified; MySQL does not handle the "<uidquery>" element properly
as it is written in the standard release. This file should be modified just before
the start of the <!-- JDBC Properties --> Loading the DatabaseLoading the database requires a couple of steps
Issues and Known BugsWhen MySQL creates the tables for uPortal, all the tables will be of the default type - MyISAM. This table type is NOT transaction safe. While uPortal does not specifically require the use of transaction-safe tables (TST), it is a good idea to use this type of table. This becomes an issue because some versions of the mm.mysql driver give a false result and report that the database is transaction safe when it isn't. The uPortal RDBMServices attempts to detect whether transactions are safe by performing, a "test" update, followed by a rollback. If a database fails this test, the string "(driver lies)" will be appended to the statment in portal.log concerning whether or not the database supports transactions. However, there are some parts of uPortal where the this methodology isn't followed, and any externally-written channels which require transaction support may fail as well. |
JA-SIG Home About uPortal FAQ Download Documentation Getting Involved Code Repository Reporting Bugs License |