MySQL database schema import file missing "USE zabbix;", fails to populate DB at install time

XMLWordPrintable

    • Type: Incident report
    • Resolution: Fixed
    • Priority: Blocker
    • None
    • Affects Version/s: 3.2.3
    • Component/s: Documentation (D)
    • Environment:
      Debian 8 64-bit, MySQL

      On a Debian 8 system the installation instructions were followed to configure the MySQL database after installing packages from the Zabbix 3.2 repositories with following result:

      1. zcat /usr/share/doc/zabbix-server-mysql/create.sql.gz | mysql -uzabbix -p
        Enter password:
        ERROR 1046 (3D000) at line 1: No database selected

      As a workaround, copy and extract the file, add the missing statement at the beginning:

      1. cd
      2. cp /usr/share/doc/zabbix-server-mysql/create.sql.gz .
      3. gunzip create.sql.gz
      4. nano create.sql

      Add this line at the start of the file:
      USE zabbix;

      Try the import again with the newly edited file:

      1. cat create.sql | mysql -uzabbix -p

      Cleanup:

      1. rm create.sql

            Assignee:
            Unassigned
            Reporter:
            Fabian Rodriguez
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: