ProLinga-Data Project |
---|
Data Source Configuration File — File containing (access) settings for the data providers.
One of the problem LibGDA solves is the naming of data sources. Every database system has it's own way of defining names for it's databases. For example MySQL uses the hostname, port number, and the name of the database. Other databases, like Solid use the hostname and port number only. Because the client does not need all these details, the libgda configuration defines all the properties of such a data source, so that the correct data base server can be contacted. This information is accessed by the client library and sent to the provider, which in turn will parse the string to decide which database must be connected to.
An example data source configuration looks like this:
<?xml version="1.0"?> <libgda-config> <section path="/apps/libgda/Datasources/stock_msql"> <entry name="DSN" type="string" value="PORT=3306;USER=prolinga;DATABASE=stock;HOST=localhost"/> <entry name="Description" type="string" value="ProLinga MySQL."/> <entry name="Password" type="string" value=""/> <entry name="Provider" type="string" value="MySQL"/> <entry name="Username" type="string" value=""/> </section> <section path="/apps/libgda/Datasources/stock_psql"> <entry name="DSN" type="string" value="HOSTADDR=127.0.0.1;PORT=5432;USER=prolinga;DATABASE=stock;HOST=localhost"/> <entry name="Description" type="string" value="Stock database in PostgreSQL"/> <entry name="Password" type="string" value=""/> <entry name="Provider" type="string" value="PostgreSQL"/> <entry name="Username" type="string" value=""/> </section> </libgda-config>
This example shows two different data sources. The first one connects to a
MySQL database and the second one to a PostgreSQL database. LibGDA requires that
the name of this file is config
and lives as either an user
file ~/.libgda/config or as a global file in [libgdainstalldir]/etc/libgda/config.
Since it is advised to run the ProLinga-Data Web Service as the root user and if you
want to configure as a user file for Linux the path and name of this file is
then /root/.libgda/config.
Future releases will include more help and possibly an utility to configure data sources.
To configure data sources other than the examples given, please look at the
LibGDA configuration documentation for more information. Alternatively, the product
libgnomedb
can be build. This product comes with a binary
called
gnome-database-properties
that can be used for configuration.
libgnomedb
is available at the
GNOME DB website.
| This is the most important entry. The value of this entry is the string sent to the provider so that it knows which datasource to access. How this entry is interpreted by the providers is provider dependent. |
| The value of this entry is a short description of the datasource. It is here for convenience only and it is not used for any purpose. |
| The password to be used when connecting to (=not logging on to) the database. This is stored in plain text, so be sure you restrict access to the configuration file (~/.libgda/config) to any "dangerous" users. |
| The value of this entry is used as the object ID for the plug-in activation. |
| The user name to be used when connecting to (=not logging on to) the database. |
<< Configuration File | Provider Notes >> |