Orthanc can be extended with two plugins that replace the default SQLite engine of Orthanc with a MySQL back-end. These plugins are compatible with MariaDB as well.
The code of the MySQL plugins is licensed under the Affero General Public License (AGPL). Pay attention to the fact that this license is more restrictive than the license of the Orthanc core.