Use of Orthanc Server with MySql Database

Hi

I am new babe to Orthanc. I had got Orthanc up and runing with default sqlite database. Now i wanted to use it MySql.

I had downloaded the required dlls (OrthancMysql index and storage.dll) and place them in plugin folders. Also made changes in the configuration file as mentioned in OrthancBook.

But will somebody tell me from where i can get the database structure to create database on my local server.

Please guide.

–HM

Hello,

The MySQL plugins will automatically setup the database structure on their first startup.

You only have to create the database in MySQL and to create a configuration file for Orthanc, as explained in the Orthanc Book:
https://book.orthanc-server.com/plugins/mysql.html#usage

HTH,
Sébastien-

Hi Sebastian

I need to know do i need to add this text (appended below) in orthanc configuration file or mysql configuration file.

{
“Name” : “MyOrthanc”,
“MySQL” : {
“EnableIndex” : true,
“EnableStorage” : true,
“Host” : “localhost”, // For TCP connections (notably Windows)
“Port” : 3306, // For TCP connections (notably Windows)
“UnixSocket” : “/var/run/mysqld/mysqld.sock”, // For UNIX on localhost
“Database” : “orthanc”,
“Username” : “orthanc”,
“Password” : “orthanc”,
“EnableSsl” : false, // force SSL connections
“SslVerifyServerCertificates”: true, // Verify server certificates if EnableSsl is true
“SslCACertificates”: “”, // Path to CA certificates to validate servers
“Lock” : true, // See section about Locking
“MaximumConnectionRetries” : 10, // New in release 3.0
“ConnectionRetryInterval” : 5, // New in release 3.0
“IndexConnectionsCount” : 1 // New in release 4.0
},
“Plugins” : [
“/home/user/orthanc-databases/BuildMySQL/libOrthancMySQLIndex.so”,
“/home/user/orthanc-databases/BuildMySQL/libOrthancMySQLStorage.so”
]
}

or i need to add in mysql configuration file.

At the moment i got only one table in orthanc database with name storagearea with three columns (uuid,content and type).

Am i following the correct procedure or missing something. Please guide.

–HM

I need to know do i need to add this text (appended below) in orthanc configuration file or mysql configuration file.

You can either use a single configuration file and start Orthanc by providing the path to this configuration file, OR you can store multiple configuration files in some folder, and start Orthanc by providing the path to this folder.

It is up to you to decide. If you use the latter approach, beware that the same configuration option cannot be placed in multiple files, otherwise Orthanc will refuse to start as it won’t be able to determine which version of the option to use.

At the moment i got only one table in orthanc database with name storagearea with three columns (uuid,content and type).

This means that only the “storage area” plugin is loaded, not the “database index” plugin. Make sure to carefully read your logs in “–verbose” mode:
https://book.orthanc-server.com/faq/log.html

Sébastien-