Versions Compared

Key

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

...

The MySQL JDBC driver is one of the ones included with the dcm4chee distributions. Feel free to update it if you need/want to.

Create the dcm4chee database

Initiate Create and initialize the pacsdb database instance using the DDL in dcm4chee-mysql-2.16.2/sql/create.mysql.dcm4chee database.

The file create.mysql can be found at <installation folder>/dcm4chee-<x.xx.x>-mysql/sql/create.mysql, where <x.xx.x> is the dcm4chee version number.

MySql 5.5+

The file create.mysql contains SQL instructions that populate the database with empty tables.

Currently, create.mysql contains instructions suitable for older versions of MySql.

Until this bug is fixed, create.mysql must be edited before it can be used with MySql 5.5+.

All instances of type= must be replaced with engine=

No Format
> mysql -uroot -p<root password>
mysql> create database pacsdb;
mysql> grant all on pacsdb.* to 'pacs'@'localhost' identified by 'pacs';
mysql> \q
> mysql -upacs -ppacs pacsdb < create.mysql

Create the ARR database

Now we should create the audit record repository (ARR) database. No need to run a create script here because the tables will be created automatically when the application starts up.

No Format
> mysql -uroot -p<root password>
mysql> create database arrdb;
mysql> grant all on arrdb.* to 'arr'@'localhost' identified by 'arr';
mysql> \q

The tables will be created automatically when the audit record repository first starts up.

If desired, <deployment folder>\dcm4chee-arr-3.0.11-mysql\sql\dcm4chee-arr-mysql.ddl can be used to manually create them now.

No Format

 > mysql -uarr -parr arrdb < dcm4chee-arr-mysql.ddl

Adjust DB configuration if necessary

The database configuration information is contained within dcm4chee-mysql-2<x.16xx.2x>-mysql/server/default/deploy/pacs-mysql-ds.xml and arr-mysql-ds.xml.

If you're using a different database name, user name, etc., you'll need to update this file.