This section describes how to create a MySQL data source name (DSN), so that Media Server can connect to your database. You must complete these steps on every Media Server host. The procedure includes example commands suitable for a CentOS 7 distribution.
TIP: Create the DSN on the same machine as Media Server. If your Media Server is running on Windows, see Create a MySQL DSN on Windows.
To create a MySQL DSN on Linux
Install the MySQL ODBC driver. For example, if you have configured the relevant Yum repository:
sudo yum install mysql-connector-odbc
Install unixODBC driver manager version 2.2.14 or later. For example:
sudo yum install unixODBC
Configure the ODBC driver.
odbcinst.ini
with a text editor. This file is usually in the /etc
directory.Unless there is already a section to configure the ODBC driver, add a new section and set the relevant parameters. When you configure the Data Source Name (DSN) you will need to refer to the name of this section.
Parameter | Description |
---|---|
Driver | The location of the MySQL ODBC driver library file. |
For example:
[MySQL ODBC 8.0 Unicode Driver] Driver=/usr/lib64/libmyodbc8w.so UsageCount=1
NOTE: You can set other parameters in this file, but these have not been tested with Media Server.
Create a Data Source Name (DSN) for Media Server to use.
odbc.ini
with a text editor. System DSNs are usually defined in /etc/odbc.ini
.Add a data source name in square brackets and configure the DSN.
Parameter | Description |
---|---|
Driver
|
The driver to use (must match the section name in odbcinst.ini ) |
Server
|
The IP address or hostname of the database server. |
Port
|
The database server port. |
User
|
The user name of the user you created for Media Server. |
Password
|
The password of the user you created for Media Server. |
Database
|
The name of the database that you created. |
no_ssps
|
If you are using MySQL ODBC Driver version 5.3.11, 5.3.12, or 8.0.12 to 8.0.18, set this parameter to 1 . For all other driver versions, set this parameter to 0 . |
For example:
[MediaServerMySQL] Driver=MySQL ODBC 8.0 Unicode Driver Server=host.example.com Port=3306 User=MediaServer Password=password Database=MediaTraining no_ssps=1
NOTE: You can set other parameters in this file, but these have not been tested with Media Server.
You can now configure Media Server to connect to the database (see Configure Media Server).