Search
Table of ContentsExtensions
Plugin: Anti-Spam Index Plugin: Search Engine

## Plugin: DB administration

### General introduction

This plugin 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

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 chek, wether 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 wether 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". Deactive the options "create tables automatically" and "copy table rows". These otions 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.

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. E.g. if: connecting to the sql-server fails, there is no no sql file available for the choosen 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.

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 create non-existing ones. When operating on very big ammounts of data you may expirience 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.

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, wether table structures should be stored ("create table ...")
export data
  sets, wether 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.

Plugin: Anti-Spam Index Plugin: Search Engine

Thomas Meyer, www.yanaframework.net