Ad Widget

Collapse

What is the format of MYSQL.DSN for the template: template_db_mysql_odbc.xml?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Gadg3ts
    Junior Member
    • Jan 2020
    • 11

    #1

    What is the format of MYSQL.DSN for the template: template_db_mysql_odbc.xml?

    For the 'official' template that lives here
    https://git.zabbix.com/projects/ZBX/...mysql_odbc.xml
    I'm basically looking for the format of {$MYSQL.DSN}
    I've tried it as
    mysql:host=mysql or host=mysql
    (the db server host is actually called "mysql")
    as that looks like what it should be from https://www.php.net/manual/en/ref.pd...connection.php
    but that doesn't appear to work...

    Thanks,
    Sean
    Last edited by Gadg3ts; 14-02-2020, 14:23.
  • kosh477
    Junior Member
    • Aug 2020
    • 3

    #2
    there is tcp://hostort
    as it says in sources:

    **Plugins.Mysql.Uri** — a URI to connect...
    *Default value:* tcp://localhost:3306..
    *Requirements:*..
    - Must match the URI format.
    - Supported sockets: TCP, Unix.

    *Examples:*
    - tcp://myhost
    - unix:/var/run/mysql.sock

    Comment

    • isaqueprofeta
      Senior Member
      Zabbix Certified SpecialistZabbix Certified Professional
      • Aug 2020
      • 154

      #3
      Like this:

      "Driver=/usr/local/lib/libmyodbc5a.so;Database=dbname;Server=127.0.0.1;Po rt=3306"
      It's on this docs: https://www.zabbix.com/documentation...es/odbc_checks

      Comment

      Working...