Ad Widget

Collapse

Cannot import initial schema and data

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • apiel1
    Junior Member
    • Apr 2018
    • 1

    #1

    Cannot import initial schema and data

    I am new to Zabbix. I am installing on Ubuntu 16.04. I get all the way to the step for importing the initial schema and data and i enter the following

    # zcat /usr/share/doc/zabbix-server-mysql*/create.sql.gz | mysql -uzabbix -p zabbix

    I get returned the following:

    Enter Password: gzip: /usr/share/doc/zabbix-server-mysql*/create.sql.gz: No Such file or directory

    Thank you for the help
  • THardy
    Junior Member
    • Apr 2018
    • 1

    #2
    Has anyone been able to help with this? I am trying to do the initial install as well and I am getting this same error. If it helps I am trying to install on Parrot Linux.

    Comment

  • saifkhantm
    Junior Member
    • Oct 2018
    • 13

    #3
    Hi Atsushi,
    I'm sorry, I dont understand your answer.

    I read the manual. Is there something in that command relating to 'version number'?
    what exactly is the fix...??

    Comment


    • Atsushi
      Atsushi commented
      Editing a comment
      "*" Is specified in the file directory specification.
      This is a wild card.

      In the RHEL package, if you specify the create.sql.gz file, the directory name contains the version number.
      If you specify that file, you can explicitly specify the version number or use wildcards.

      ex. file path for RHEL
      /usr/share/doc/zabbix-server-mysql-4.0.0/create.sql.gz

      In the package for Ubuntu I think that the directory number did not include the version number.

      If the create.sql.gz file does not exist, please check that it was not set to not install the document attribute file with the command used to install the package.
  • DmitryL
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • May 2016
    • 278

    #4
    Check the correct path from your CLI instead of copy/paste from the documentation.
    I mean this one: /usr/share/doc/zabbix-server-mysql*/create.sql.gz

    Comment

    • saifkhantm
      Junior Member
      • Oct 2018
      • 13

      #5
      Hi Dmitry,
      The file path is correct..

      Click image for larger version

Name:	Screen Shot 2018-10-04 at 4.26.31 AM.png
Views:	8563
Size:	10.1 KB
ID:	366646


      I'm getting this syntax error msg;

      Click image for larger version

Name:	Screen Shot 2018-10-04 at 4.31.54 AM.png
Views:	8481
Size:	5.5 KB
ID:	366647


      I'm sorry for the screen shots, i'm working with CONSOLE... and it does not let me copy text..

      Comment

      • DmitryL
        Senior Member
        Zabbix Certified SpecialistZabbix Certified Professional
        • May 2016
        • 278

        #6
        zcat ........./create.sql.gz | mysql -uzabbix -pzabbix

        Comment

        • saifkhantm
          Junior Member
          • Oct 2018
          • 13

          #7
          ... no go...

          Click image for larger version

Name:	Screen Shot 2018-10-04 at 5.33.39 AM.png
Views:	8447
Size:	20.3 KB
ID:	366652

          Comment


          • Atsushi
            Atsushi commented
            Editing a comment
            Please check your command line.

            NG:
            # zcat /usr/share/doc/zabbix-server-mysql/create.sql.gz > mysql -uzabbix -p zabbix
            OK:
            # zcat /usr/share/doc/zabbix-server-mysql/create.sql.gz | mysql -uzabbix -p zabbix
        • saifkhantm
          Junior Member
          • Oct 2018
          • 13

          #8
          yes...
          thank you for pointing that out.
          I am using console connection to the server.
          for some reason, its not letting my type "|", instead it types ">"

          Its something to do with the console keyboard.

          Going to try and get SSH working. Then I can type in terminal window...

          But thanks for the clarificatons and help.

          Comment

          • saifkhantm
            Junior Member
            • Oct 2018
            • 13

            #9

            SUPER K.

            I was able establish SSH and use "|" and it worked.
            Thanks folks !!!

            Comment

            • shehzadkhan
              Junior Member
              • May 2020
              • 1

              #10
              i have the same problem. i navigated to the path usr/share/doc$ and the next folder i can see the full directory name as: zabbix-server-mysql:

              Click image for larger version

Name:	z1.png
Views:	7695
Size:	35.3 KB
ID:	402099

              but it didn't work as:

              zcat /usr/share/doc/zabbix-server-mysql/create.sql.gz | mysql -uzabbix -p


              i then navigate to /usr/share/doc/zabbix-server-mysql/ and use the command zcat create.sql.gz | mysql -uzabbix -p database_name

              it didn't through an error. but when i re-tried the command:

              zcat /usr/share/doc/zabbix-server-mysql/create.sql.gz | mysql -uzabbix -p zabbix # last zabbix -p <space> is the name of the database it threw this error:

              ERROR 1050 (42S01) at line 1: Table 'users' already exists

              any ideas???
              Attached Files

              Comment

              • Atsushi
                Senior Member
                • Aug 2013
                • 2028

                #11
                If you run the following command and an error is output, it means that the table has already been created.
                Code:
                $ zcat /usr/share/doc/zabbix-server-mysql/create.sql.gz | mysql -uzabbix -p zabbix
                Either use the one already created or recreate the database.

                Comment

                • blixten85
                  Junior Member
                  • May 2021
                  • 1

                  #12
                  I do not have this package at all.

                  pi@raspberrypi:~ $ sudo ls -la /usr/share/doc/zabbix-server-mysql*
                  total 336
                  drwxr-xr-x 2 root root 4096 May 12 19:20 .
                  drwxr-xr-x 1311 root root 49152 May 12 18:55 ..
                  -rw-r--r-- 1 root root 16190 Feb 6 2019 changelog.Debian.gz
                  -rw-r--r-- 1 root root 249196 Feb 4 2019 changelog.gz
                  -rw-r--r-- 1 root root 8411 Feb 6 2019 copyright
                  -rw-r--r-- 1 root root 1212 Apr 28 2018 NEWS.Debian.gz
                  -rw-r--r-- 1 root root 1002 Apr 28 2018 README.Debian

                  I read here about uncomment some manual skip part for dpkg.
                  create.sql.gz: No such file or directory - ZABBIX Forums

                  This file does not exist for me.

                  Comment

                  Working...