> For the complete documentation index, see [llms.txt](https://prosbcdocs.telcobridges.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://prosbcdocs.telcobridges.com/telecom-references/apis-and-integration/software-configuration-database.md).

# Software:Configuration Database

The [Toolpack](https://telcobridges.com/products/development-platforms-tdev/) configuration is located in a MySQL database.

### High Availability

#### Database Connection

Since [Toolpack](https://telcobridges.com/products/development-platforms-tdev/) is not necessarily running on the same host as the MySQL database, it uses sockets to connect to the database. To increase the reliability, [Toolpack](https://telcobridges.com/products/development-platforms-tdev/) uses 2 database connections. If one becomes unavailable(example network is down), [Toolpack](https://telcobridges.com/products/development-platforms-tdev/) can still connect to the database using the other sub net. It is recommended to use the [Toolpack](https://telcobridges.com/products/development-platforms-tdev/) control network sub net for the database connection.

#### Database Replication

To protect against a loss of database, [Toolpack](https://telcobridges.com/products/development-platforms-tdev/) uses the MySQL database replication feature. In a typical 2 hosts redundancy setup, the [primary](https://github.com/telcobridges-main/tmedia-wiki/tree/main/reference/misc/primary-secondary/README.md) and [secondary](https://github.com/telcobridges-main/tmedia-wiki/tree/main/reference/misc/primary-secondary/README.md) hosts will run a [Toolpack](https://telcobridges.com/products/development-platforms-tdev/) system and a MySQL database. At start up, [Toolpack](https://telcobridges.com/products/development-platforms-tdev/) will configure one database as [master](https://github.com/telcobridges-main/tmedia-wiki/tree/main/reference/misc/master-slave/README.md) database, the other as [slave](https://github.com/telcobridges-main/tmedia-wiki/tree/main/reference/misc/master-slave/README.md). Once the database configuration is done the [master](https://github.com/telcobridges-main/tmedia-wiki/tree/main/reference/misc/master-slave/README.md) database will copy itself in the [slave](https://github.com/telcobridges-main/tmedia-wiki/tree/main/reference/misc/master-slave/README.md) database. After that, any changes made on the [master](https://github.com/telcobridges-main/tmedia-wiki/tree/main/reference/misc/master-slave/README.md) database will then get replicated on the [slave](https://github.com/telcobridges-main/tmedia-wiki/tree/main/reference/misc/master-slave/README.md) database.

The following figure illustrates the database setup in a high availability system:

![High available Toolapck system with the master database on the primary host](https://docs.telcobridges.com/w/images/7/74/DB_HA_Prim_master.png)

It is interesting to note that both Toolpack system access the same database.

The next image shows a database [switchover](https://github.com/telcobridges-main/tmedia-wiki/tree/main/reference/misc/switchover/README.md), since the primary database is lost, the secondary database becomes master and both [Toolpack](https://telcobridges.com/products/development-platforms-tdev/) interacts with the new master database:

![High available Toolapck system with the master database on the secondary host after a switchover](https://docs.telcobridges.com/w/images/c/c9/DB_HA_Sec_master_No_Prim.png)

When the [primary](https://github.com/telcobridges-main/tmedia-wiki/tree/main/reference/misc/primary-secondary/README.md) database becomes available again, [Toolpack](https://telcobridges.com/products/development-platforms-tdev/) sets it as replication [slave](https://github.com/telcobridges-main/tmedia-wiki/tree/main/reference/misc/master-slave/README.md). There is no database switch back as illustrate with the following image:

![High available Toolapck system with the master database on the secondary host](https://docs.telcobridges.com/w/images/4/49/DB_HA_Sec_master.png)

### Solution Developers

For solution developers that use MySQL in there solution, there are extra MySQL configuration to consider. If your solution also uses MySQL replication, it will be mandatory to use different instances of MySQL server, one set of server for both system ([Toolpack](https://telcobridges.com/products/development-platforms-tdev/) and your solution). If your solution uses MySQL but not the replication feature, it will be important to configure the MySQL server to replicate only the [Toolpack](https://telcobridges.com/products/development-platforms-tdev/) database (toolpack\_0 by default).

### References

* [MySQL Replication](http://dev.mysql.com/doc/refman/5.0/en/replication.html)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://prosbcdocs.telcobridges.com/telecom-references/apis-and-integration/software-configuration-database.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
