Ad Widget

Collapse

zabbix and mysqli

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • wurstyin
    Junior Member
    • May 2014
    • 2

    #1

    zabbix and mysqli

    Dear all,

    I am using zabbix to monitor my own services even I am not a root user.
    It means I have to install and start all processes as a user unix lambda and not as root.

    Now I was using zabbix 2.0.6 with php5.4.16.
    And I wanted to upgrade zabbix server version.
    So I choose to upgrade with zabbix 2.2.10 as it is recommended but I was not able to connect on the MySQL DB due to a mysqli_connect issue.

    The configuration is:
    zabbix: 2.2.10
    apr 1.4.6
    apr-util 1.5.2
    httpd 2.2.24
    openldap 2.4.35
    php5: 5.4.16
    MySQL 5.1.71

    PHP was configured with these options:
    --with-mysql=mysqlnd \
    --with-mysqli=mysqlnd \
    --with-pdo-mysql=mysqlnd \

    I was able to connect when I updated this line in the file : conf/db.inc.php.
    $DB['DB'] = mysqli_connect($DB['SERVER'], $DB['USER'], $DB['PASSWORD'], $DB['DATABASE'], $DB['PORT']);

    by:
    $DB['DB'] = mysqli_connect("hostname:3306", "mysqluser", "mysqlpasswd", "zabbix");

    After that : it was working fine

    Do you understand why I have this issue?
    Why do I have to change the connect command?

    Thanks for your feedback
Working...