Installing the myDBR application

To install the myDBR application manually, you need to complete the following steps. (Please note that myDBR also provides an automated installation wizard. Launch the wizard by simply pointing your browser at the mydbr-directory):

  1. Download the application
  2. Setup the database
  3. Install the PHP loader
  4. Install the application

Download the myDBR application

Download the myDBR application from the myDBR website. You will receive a zip package containing the application. Extract the files from the zip package and place them under your web root.

Select the database user for myDBR

When you launch myDBR for the first time, you will be asked for the username and password under which myDBR operates. The username and the password provided need to have the following:

  1. Full access to reporting database's objects (by default mydbr) - see the image below
  2. Select access to the database which contains the actual data to be reported (user database) - see the picture below
myDBR application and database access

You can use your existing database account to access myDBR or create a new database account. Below is an example of creating a new myDBR user account 'mydbr' in MySQL.

$ mysql -uroot -p --default-character-set=utf8mb4
Enter password: ******
mysql> create user 'mydbr'@'localhost' identified by 'mydbr_password';
mysql> exit;

In SQL Server and Sybase, create the database with owner 'mydbr' (or db_owner role). Then grant read access to the actual database containing the data you wish to read from (either directly or via db_datareader-role).

If you do not have permissions to create new users, you can use an existing user and assign the required privileges (see later steps).

Prepare the report database

myDBR stores all the reporting information (reports, internal objects, etc.) in a database. You can install them into a separate database (recommended). Alternatively, install the items directly to the database you will be reporting from if you only have access to one database. All items in myDBR are named with '*mydbr*' to separate them from the user's data and objects.

myDBR requires full access to the myDBR reporting database and select access to the database you are reporting from. See the image above. You can either use an existing database user or create a new one. In this example installation, we have created a user with the name 'mydbr'.

Change to the db_creation directory (we'll use the database creation scripts):

$ cd install/db_creation
  • For MySQL:
    1. Create the mydbr database (or use any existing database):
      $ mysql -uroot -p --default-character-set=utf8mb4
      Enter password: ******
      mysql> create database mydbr character set = 'utf8mb4';
      mysql> exit
      

    2. Add required privileges for the 'mydbr' user:
      1. Full access to myDbr database and
      2. Select access to 'mydatabase'
      As an example we have created a user called 'mydbr' and our data resides in the 'mydatabase' database.
      $ mysql -uroot -p --default-character-set=utf8mb4
      Enter password: ******
      mysql> grant all on mydbr.* to 'mydbr'@'localhost';
      mysql> grant select on mydatabase.* to 'mydbr'@'localhost';
      mysql> exit
      

    3. Create the mydbr reporting database objects:
      $ mysql -umydbr -p --default-character-set=utf8mb4 mydbr <  mydbr_create_mysql.sql
      Enter password: ******
      
      If the creation script finishes without errors, you are ready to move to the next step

  • For Microsoft SQL Server:
    1. Create a database called 'mydbr' with the Microsoft SQL Server Management Studio with 'mydbr' as the owner
    2. Create database objects:
      C:\>osql -n -U mydbr -P password -d mydbr <  mydbr_create_mssql.sql
      If you do encounter problems during the database creation, please check that you have sufficient privileges for creating database objects.

  • For Sybase ASE
    1. Create a database called 'mydbr' with the Sybase tool with 'mydbr' as the owner
    2. Create the database objects:
      isql -Umydbr -Ppasssword -Dmydbr <  mydbr_create_sybase.sql
      If you do encounter problems during the database creation, please check that you have sufficient privileges for creating database objects.

  • SQL Anywhere:
    1. SQL Anywhere uses one database model, so the myDBR objects are created in a user database. Use a different username (mydbr) to create the objects
    2. Create database objects:
      isql -Umydbr -Ppasssword -Dmydb <  mydbr_create_sybase.sql
      If you do encounter problems during the database creation, please check that you have sufficient privileges for creating database objects.

The install script will create a myDBR admin (user inside myDBR) with a username/password dba/dba. You should change the username/password as soon as you have installed the application.

Install the myDBR application

The last thing to be done is to move the unpacked mydbr-directory to your server root and change its permissions.

  1. Check your server root and copy the unpacked mydbr-directory into it.
  2. Ensure that all the files have the appropriate owner, i.e., the files are readable by the web server. See the example below.
  3. Ensure that the myDBR's configuration file config.php is writable to the web server. This allows the admin to change myDBR's settings via the browser. Also, make sure that it is not readable to other users.
  4. The first time you launch the application (point the browser to the myDBR web share), the application will ask you for the connection information and formatting options. The username and the password asked in this screen need to have ownership of the myDBR database and access to the reported data.

Example permissions on Linux (check your document directory and apache user). On MacOS X the apache user is by default "_www".

$ sudo mv mydbr /var/www/html
$ cd /var/www/html/mydbr
$ sudo chown -R apache:apache * .
$ sudo chmod -R go-r *
$ sudo chmod -R u+w *

Point your browser to http://localhost/mydbr/. If your installation is complete, you are greeted with the setup screen.

If you ever need to reset the install to this point, in the config.php contains a key 'SETUPDONE' which will determine if the myDBR application will present the install screen or the standard login screen.

Installation wizard

The first time you use the application, you will be greeted by the install wizard. By this point, you should be able to enter the connection details into your reporting database. myDBR also checks the setup to see that your environment is in working order. If you see error messages on the screen, please fix the configuration errors before proceeding.

Required fields

Database vendor
Select the database vendor. myDBR uses a native connection to each database for maximum performance.
Host
The computer where the reporting database is located. Hostname or IP address.
Database
The name of the database containing the mydbr objects.
Username

The admin user's username. This user must have privileges to the mydbr database object, including the right to execute stored routines. In the example installation, we created user mydbr for this purpose.

If myDBR will be configured in MySQL (at a later stage), to use database authentication, root access is needed. No root access is required if the authentication is myDBR or external application authentication.

Password
The password for the admin user.
Use SSL
When using MySQL, the traffic between the web server and the database server can be secured with SSL. Checking this option will force the connection to use SSL. You can additionally use the certificates to limit the connection to a known client/host.
Key File
The client's private key (must be used with Certificate)
Certificate (must be used with Key File)
Client certificate
CA Cert
The certificate authority certificate

Complete the setup and you should be ready to log in with the default username dba and password dba. You should change this after the setup is done.