To use this module you must define one or more database connections, using tags like the one below:
<database name="mydb"
username="myuser"
password="mypass"
hostname="localhost"
port="1433"
id="anytext">
The variables in the tag have the following meanings:
- name - The name of the database this connection is bound to. This may be any database you have ability to access
- username - The MySQL username with which you want to access the database
- password - The password required to access the database
- hostname - The hostname of the database. Most of the time you will just want localhost here
- port - The port to connect to if you run your server on a non-standard port.
- id - The id of the database. Dependent modules will use this ID to refer to the connection, rather than its credentials, so that the credentials are specified only in one place. Any text can be used as the database ID. In the previous version of the SQL API this was an integer, however it is now a string to allow for more descriptive IDs.
You may define as many databases as you wish, but remember it is most secure to only define ones that your modules will actually use.
|