Ad Widget

Collapse

Error connecting to database: No such file or directory (After 4.4 to 5.0 upgrade)

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • zaheerabbas1988
    Junior Member
    • Feb 2020
    • 22

    #1

    Error connecting to database: No such file or directory (After 4.4 to 5.0 upgrade)

    Hello Awesome People,

    I am having the issue stated on subject after upgrading from 4.4 to 5.0.

    Everything seems to be upgraded smoothly and I have followed the official documentation.

    I have the following packages installed in my server:

    Mariadb 10.4
    PHP 7.2
    Apache 2.4.6
    Server OS : CentOS 7 minimal

    Background: I am running this server with zabbix 4.4 since last 8 months without any issue, but after this upgrade I am getting the error "Database Error : Error connecting to database: No such file or directory " on front end.

    Upon further investigation, it was found that mariadb and zabbix server both are running propery without any error or warning. I am even getting the triggers as usual, but something is wrong with the frontend configruation.

    My following zabbix configurations are as per the official documentation

    /etc/httpd/conf.d/zabbix.conf
    /etc/opt/rh/rh-php72/php-fpm.d/zabbix.conf

    So no issue there.

    I think from somewhere my zabbix frontend is missing the configuration of database socket, but I dont know where. I even crossed checked the php.ini zabbix.conf and verified my database dir is set properly.

    Any ideas?
  • zaheerabbas1988
    Junior Member
    • Feb 2020
    • 22

    #2
    Ok, the problem was with php.ini configuration. I changed the php.ini configuration placed in /etc/php.ini but missed in /etc/opt/rh/rh-php72/php.ini.

    After changing the database data dir in mentioned file resolved my issue.

    Comment

    Working...