Ad Widget

Collapse

error sh: 0: getcwd() after zcat /usr/share/zabbix/sql-scripts/mysql/server.sql.gz...

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ams
    Junior Member
    • Mar 2026
    • 1

    #1

    error sh: 0: getcwd() after zcat /usr/share/zabbix/sql-scripts/mysql/server.sql.gz...

    i'm attempting to install zabbix 7.4 on ubuntu 22.04 jammy. after creating the mysql db successfully, i run the command (from the installation proc):
    # zcat /usr/share/zabbix/sql-scripts/mysql/server.sql.gz | mysql --default-character-set=utf8mb4 -uzabbix -p zabbix
    the following error is given:
    sh: 0: getcwd() failed: No such file or directory
    i am then prompted for passwd which results in:
    ERROR 1045 (28000): Access denied for user 'zabbix'@'localhost' (using password: YES)

    looks like bad passwd, but... a)that doesn't explain the getcwd() failed error and
    b) the passwd is ok because "mysql -uroot -p" accepts that passwd.
    any assistance is appreciated.
    tnx
  • guntis_liepins
    Member
    • Oct 2025
    • 55

    #2
    mysql -u root -p verifies root user not zabbix user password.
    zabbix installation instructions specify how to create database . Create initial database
    ...


    mysql> create user zabbix@localhost identified by 'password';
    mysql> grant all privileges on zabbix.* to zabbix@localhost;
    ...

    It will create new user zabbix at localhost with password 'password' (your password comes here).
    This password is what you should use when connecting to zabbix with zabbix user (not root password)
    When in doubt you can add database with -D zabbix option to mysql command

    Comment

    Working...