Ad Widget

Collapse

ODBC Error

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • nmz
    Member
    • Jan 2016
    • 69

    #1

    ODBC Error

    I have setup ODBC Item and I got the this error: Cannot connect to ODBC DSN:[SQL_ERROR]:[IM002][0][[unixODBC][Driver Manager]Data source name not found, and no default driver specified]| I can test isql and got result. This is my odbc.ini :
    Code:
    [DB_Testing]
    Driver          = /usr/lib64/libmyodbc5w.so
    Description = MySQL Database Monitoring with ODBC
    Driver      = mysql
    Server      = <MY ACTUAL IP>
    User        = db_user
    Password    = db_pwd
    Port        = 3306
    Database    = otrs
    SOCKET      = /var/run/mysql/mysql.sock
    and this is my odbcinist.ini
    Code:
    [PostgreSQL]
    Description=ODBC for PostgreSQL
    Driver=/usr/lib/psqlodbcw.so
    Setup=/usr/lib/libodbcpsqlS.so
    Driver64=/usr/lib64/psqlodbc5w.so
    Setup64=/usr/lib64/libodbcpsqlS.so
    FileUsage=1
    UsageCount=2
    
    [MySQL]
    Description=ODBC for MySQL
    Driver=/usr/lib/libmyodbc5.so
    Setup=/usr/lib/libodbcmyS.so
    Driver64=/usr/lib64/libmyodbc5.so
    #Driver64=/usr/lib64/libmyodbc5w.so
    Setup64=/usr/lib64/libodbcmyS.so
    FileUsage=1
    UsageCount=2
    
    [MySQL ODBC 5.3 Unicode Driver]
    Driver=/usr/lib64/libmyodbc5w.so
    UsageCount=3
    
    [MySQL ODBC 5.3 ANSI Driver]
    Driver=/usr/lib64/libmyodbc5a.so
    UsageCount=2
    and that's my Item in zabbix
    Name : some name
    Type : Database monitor
    KEY : db.odbc.select[odbc-check,DB_Testing]
    user : DB_user
    pwd : DB_PWD
    SQL QUERY : select count(*) from user;
  • HTC
    Junior Member
    • Mar 2016
    • 3

    #2
    You have the solution to this problem?

    Thanks

    Comment

    • mark.chan
      Member
      • Mar 2016
      • 35

      #3
      can you connect the database use command line?

      # isql -v DB_Testing

      Comment

      • roberts.andzans
        Junior Member
        • Feb 2016
        • 20

        #4
        Hi,

        In odbc.ini file is section Driver = mysql
        Instead of mysql write in specific driver [in this case it is - MySQL ODBC 5.3 Unicode Driver] name from odbcinist.ini file.

        Rob

        Comment

        • white_wire
          Junior Member
          Zabbix Certified Specialist
          • Apr 2010
          • 6

          #5
          failure on connecting through mysql-odbc-connector 5.3

          after installing 5.3 on zabbix-3.0.0 i have faced with below error:
          zabbix_proxy: poller #7 [got 1 values in 0.111552 sec, getting values]: /export/home/pb2/build/sb_0-18248528-1457725081.44/rpm/BUILD/mysql-connector-odbc-5.3.6-src/driver/results.c:1690: fill_ird_data_lengths: Assertion `fields == ird->count' failed.
          12973:20161018:102513.940 One child process died (PID:13079,exitcode/signal:6). Exiting ...


          also Unicode query result not showing

          Comment

          Working...