Table of Contents
List of Tables
List of Examples
This is a module which provides MySQL connectivity for OpenSIPS. It implements the DB API defined in OpenSIPS.
The following modules must be loaded before this module:
If a tls_client_domain is defined, the tls_mgm module will need to be loaded as well.
If queries take longer than 'exec_query_threshold' microseconds, warning messages will be written to logging facility.
Default value is 0 - disabled.
Example 1.1. Set exec_query_threshold
parameter
... modparam("db_mysql", "exec_query_threshold", 60000) ...
Time interval after which a connection attempt (read or write request) is aborted. The value counts three times, as several retries are done from the driver before it gives up.
The read timeout parameter is ignored on driver versions prior to “5.1.12”, “5.0.25” and “4.1.22”. The write timeout parameter is ignored on version prior to “5.1.12” and “5.0.25”, the “4.1” release don't support it at all.
Default value is 2 (6 sec).
The maximum number of retries to execute a failed query due to connections problems. If this parameter is set improperly, it is set to default value.
Default value is 2.
The maximum number of database connection retries. If this parameter is set improperly, it is set to default value.
Default value is 3.
Setting this parameter will enable TLS for all MySQL connections established by the module. Refer to the tls_mgm module for additional info regarding TLS client domains.
If using this parameter, you must also ensure that tls_mgm is loaded and properly configured.
Note that if you want to use this feature, the certificate must be provisioned in the configuration file, NOT in the database. In case you are loading TLS certificates from the database, you must at least define the default domain in the configuration script, where is currently the only place you can define it.
Default value is NULL (not set)
Example 1.5. Set the tls_client_domain
parameter
... modparam("tls_mgm", "client_domain", "1=10.11.12.13:3306") modparam("tls_mgm", "certificate", "1:/etc/pki/tls/certs/opensips.pem") modparam("tls_mgm", "private_key", "1:/etc/pki/tls/private/opensips.key") modparam("tls_mgm", "ca_list", "1:/etc/pki/tls/certs/ca.pem") ... modparam("db_mysql", "tls_client_domain", "1=10.11.12.13:3306") ...
Because it dependes on an external library, the mysql module is not compiled and installed by default. You can use one of the next options.
- edit the "Makefile" and remove "db_mysql" from "excluded_modules" list. Then follow the standard procedure to install OpenSIPS: "make all; make install".
- from command line use: 'make all include_modules="db_mysql"; make install include_modules="db_mysql"'.
Table 2.1. Top contributors by DevScore(1), authored commits(2) and lines added/removed(3)
Name | DevScore | Commits | Lines ++ | Lines -- | |
---|---|---|---|---|---|
1. | Jan Janak (@janakj) | 153 | 53 | 5336 | 3190 |
2. | Bogdan-Andrei Iancu (@bogdan-iancu) | 100 | 72 | 1577 | 792 |
3. | Henning Westerholt (@henningw) | 59 | 30 | 693 | 1239 |
4. | Daniel-Constantin Mierla (@miconda) | 28 | 20 | 571 | 154 |
5. | Liviu Chircu (@liviuchircu) | 21 | 16 | 361 | 102 |
6. | Andrei Pelinescu-Onciul | 16 | 14 | 52 | 49 |
7. | Razvan Crainea (@razvancrainea) | 14 | 11 | 214 | 45 |
8. | Jiri Kuthan (@jiriatipteldotorg) | 11 | 6 | 393 | 2 |
9. | Vlad Paiu (@vladpaiu) | 10 | 8 | 121 | 15 |
10. | Nils Ohlmeier | 5 | 3 | 24 | 3 |
All remaining contributors: Norman Brandinger (@NormB), Vlad Patrascu (@rvlad-patrascu), Eseanu Marius Cristian (@eseanucristian), Dan Pascu (@danpascu), Ionut Ionita (@ionutrazvanionita), Ovidiu Sas (@ovidiusas), Konstantin Bokarius, Andreas Heise, Razvan Pistolea, Saúl Ibarra Corretgé (@saghul), Sergio Gutierrez, Edson Gellert Schubert.
(1) DevScore = author_commits + author_lines_added / (project_lines_added / project_commits) + author_lines_deleted / (project_lines_deleted / project_commits)
(2) including any documentation-related commits, excluding merge commits. Regarding imported patches/code, we do our best to count the work on behalf of the proper owner, as per the "fix_authors" and "mod_renames" arrays in opensips/doc/build-contrib.sh. If you identify any patches/commits which do not get properly attributed to you, please submit a pull request which extends "fix_authors" and/or "mod_renames".
(3) ignoring whitespace edits, renamed files and auto-generated files
Table 2.2. Most recently active contributors(1) to this module
Name | Commit Activity | |
---|---|---|
1. | Razvan Crainea (@razvancrainea) | Oct 2011 - Sep 2018 |
2. | Vlad Patrascu (@rvlad-patrascu) | Apr 2017 - Sep 2018 |
3. | Liviu Chircu (@liviuchircu) | Mar 2014 - Aug 2018 |
4. | Bogdan-Andrei Iancu (@bogdan-iancu) | Aug 2002 - Jun 2018 |
5. | Ovidiu Sas (@ovidiusas) | Mar 2017 - Mar 2017 |
6. | Ionut Ionita (@ionutrazvanionita) | Feb 2016 - Feb 2016 |
7. | Eseanu Marius Cristian (@eseanucristian) | Jul 2015 - Jul 2015 |
8. | Vlad Paiu (@vladpaiu) | Feb 2011 - Aug 2014 |
9. | Saúl Ibarra Corretgé (@saghul) | Nov 2011 - Nov 2011 |
10. | Razvan Pistolea | Jul 2009 - Jul 2009 |
All remaining contributors: Norman Brandinger (@NormB), Sergio Gutierrez, Henning Westerholt (@henningw), Daniel-Constantin Mierla (@miconda), Konstantin Bokarius, Edson Gellert Schubert, Andreas Heise, Jan Janak (@janakj), Andrei Pelinescu-Onciul, Dan Pascu (@danpascu), Jiri Kuthan (@jiriatipteldotorg), Nils Ohlmeier.
(1) including any documentation-related commits, excluding merge commits
Last edited by: Liviu Chircu (@liviuchircu), Razvan Crainea (@razvancrainea), Bogdan-Andrei Iancu (@bogdan-iancu), Eseanu Marius Cristian (@eseanucristian), Vlad Paiu (@vladpaiu), Daniel-Constantin Mierla (@miconda), Konstantin Bokarius, Edson Gellert Schubert, Henning Westerholt (@henningw).
doc copyrights:
Copyright © 2006 Voice Sistem SRL