Complete these instructions if you will be using the PostgreSQL database. If you will be using the Oracle database, instead use the Oracle setup instructions.
- Select Start > Programs > PostgreSQL 8.4 > pgAdminIII.
- The pgAdminIII window opens. Right-click the PostgreSQL 8.4 (localhost:5432) icon, and select Connect, as shown here:
- Log in to the database server using the password you set up during the PostgreSQL installation.
- Create the database openclinica and the database user clinica, which OpenClinica uses to connect to the database:
- Expand the databases, and select postgreSQL.
- Select Tools > Query tool.
The Query window opens. - In the SQL Editor box, delete all the text.
- In the SQL Editor box, type the following:
CREATE ROLE clinica LOGIN ENCRYPTED PASSWORD ‘clinica’ SUPERUSER NOINHERIT NOCREATEDB NOCREATEROLE; - Select Query > Execute, which runs the SQL query.
When the query completes, a message displays in the History window. - In the SQL Editor box, delete all the text.
- In the SQL Editor box, type the following:
CREATE DATABASE openclinica WITH ENCODING=’UTF8′ OWNER=clinica; - Select Query > Execute.
When the query completes, a message displays in the History window. - Close the Query window, and click No when prompted to save changes.
- The database password is set to clinica by default, which is not a secure password. Change the password as follows:
- In the pgAdminIII window, expand and select Login Roles.
- Select View > Refresh.
The clinica database user is listed. - Right-click the clinica user account and select Properties.
- In the Login Role for clinica box that displays, enter the new password and re-enter it, then click OK. Record the password for future use.