>> Table of Contents >> Extensions

Plug-in: DB administration

General introduction

This plug-in enables you to edit the connection settings for your database. Furthermore it allows you to install table, transfer required data and create backups.

Setting a database connection

form
Figure: database connection settings

Set the option "use database" to the value "yes", to use the database connection with the given values. The installation of the database is automatically implemented. Only in the event of an error, you need to manually intervene.

Upon activation of the database the following actions are carried out automatically:
  1. test of connection parameters
  2. open a connection to the database
  3. install all required tables
  4. copy all data from file system to database

Should any of these steps result in an error, the connection is not activated and an error message is shown. A detailed description of the error can be found in the error log. Please note that logging must have been activated at this point (see chapter "logging and error messages").

Troubleshooting

In case of an error, you may also complete the steps manually, which usually would be carried out automatically during activation of the database connection. To do so, proceed as follows.

  1. Check you connection settings for errors. Continue, if you are sure, that they are correct.
  2. Enter the connection parameters for your database and save your changes. Leave the option "use database" unchanged to the value "no".
  3. Select the option "install databases". Try to execute this action be clicking on "submit" (see figure). If this is successful, continue to the next step.
    In case of an error, please use another program to check, whether the tables already exist. If so, please drop those tables and try again.
    If the tables don't exist, use another program and try to install the tables. The sources can be found in chapter "Advanced User's Guide" / "Configuration". If this is successful, check your connection settings again.
  4. Select the option "synchronize databases". At first, only try to synchronize the database "user". Deactivate all other options. Then try to synchronize the other databases (see figure). If any of these steps result in an error, the reason might be a data error. You may then decide to waive this data. If this can't be done, you have the opportunity to whether manually copy the data to the target database, or fix the data in the source database.
    The source data can be found in text files within the directory "config/db/name", where "name" stands for the name of the database. This option is only recommended to experienced users.
  5. If the above steps have been successful, then select the option "setup connection to your database". Make sure that you enabled the expert mode at the administration panel. Set the option "use database" to the value "yes". Deactivate the options "create tables automatically" and "copy table rows". These options are only visible in expert mode. Then, click on "submit" (see figure).

Please also note the compatibility notes!

install databases

? Note: This step is executed automatically, when a database connection is activated. The form shown here is meant to be used for manual intervention in case of an error.

form
Figure: form to install tables

This step will try to create the tables belonging to the chosen databases on the database server. Therefore it will try to import sql files, appropriate to chosen type of database. These requires prior proper set up of a connection to the database. You should however not yet activate this connection before you have installed the required tables.

In some uncommon cases this process may fail. For example, if: connecting to the database server fails, there is no SQL file available for the chosen DBMS, the generated SQL contains errors, another table with the same name already exists, the user does not have the appropriate rights to create the tables. In those cases the installation needs to be done by hand.

The required SQL files to create the tables can be found in chapter "Advanced User's Guide" / "Configuration".

Synchronize databases

? Note: This step is executed automatically, when a database connection is activated. The form shown here is meant to be used for manual intervention in case of an error.

form
Figure: form to copy table contents to your database

This synchronizes the entries in your text files with those in your database. The process does NOT delete or update any existing entries, but only creates new ones. When operating on very big amounts of data you may experience a timeout before the process is completed. If this happens, redo this procedure multiple times until all data has been transfered.

Creating a backup

? Note: This option requires an active database connection.

form
Figure: form to create a backup of a database

Use this option to create a backup copy of your database.

SQL syntax
the SQL dialect, which the output should use
export structure
sets, whether table structures should be stored ("create table ...")
export data
sets, whether data sets in tables should be stored
compress as GZip
since backups may be very large, this gives you the option to compress the file in GZip format prior to downloading it. This will cause the file to be smaller.

Author: Thomas Meyer, www.yanaframework.net