Ad Widget

Collapse

fail for import initial schema and data.

Collapse
This topic has been answered.
X
X
 
  • Time
  • Show
Clear All
new posts
  • skveen
    Junior Member
    • Jun 2023
    • 4

    #1

    fail for import initial schema and data.

    hello all
    I have some problems when installing zabbix:
    Host A for zabbix 6.4 (https://www.zabbix.com/download?zabbix=6.4&os_distribution=debian&os_vers ion=11&components=server_frontend_agent&db=pgsql&w s=apache)

    I use zabbix-agent2 instead of zabbix-agent
    I guess that shouldn't be the problem​

    Host B for database

    Then I copied the file /usr/share/zabbix-sql-scripts/postgresql/server.sql.gz from Host A to Host B 's /tmp directory and execute
    Code:
    /tmp#zcat /tmp/server.sql.gz | sudo -u zabbix psql zabbix
    the output error:
    sudo: unknown user: zabbix
    sudo: error initializing audit plugin sudoers_audit


    How can I deal with this error?

    Thanks!
  • Answer selected by skveen at 28-06-2023, 04:27.
    Atsushi
    Senior Member
    • Aug 2013
    • 2028

    Users on the OS and users on the DBMS are different. The sudo command is for changing the user on the OS to run commands. It is not for switching users on the DBMS. If you use the psql command to create the table, use the zabbix user on the DBMS to connect to the DBMS and perform operations.

    Comment

    • Atsushi
      Senior Member
      • Aug 2013
      • 2028

      #2
      Users on the OS and users on the DBMS are different. The sudo command is for changing the user on the OS to run commands. It is not for switching users on the DBMS. If you use the psql command to create the table, use the zabbix user on the DBMS to connect to the DBMS and perform operations.

      Comment

      Working...