ML
    • Recent
    • Categories
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    Installation of Zabbix in Centos 7

    IT Discussion
    linux zabbix centos 7 centos
    6
    126
    57.8k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • LakshmanaL
      Lakshmana
      last edited by

      when I used the above command i can login to the MariaDB but when i use the command to import the template the same error coming in the terminal

      scottalanmillerS 1 Reply Last reply Reply Quote 0
      • scottalanmillerS
        scottalanmiller @Lakshmana
        last edited by

        @Lakshmana said:

        when I used the above command i can login to the MariaDB but when i use the command to import the template the same error coming in the terminal

        Please provide the complete command.

        1 Reply Last reply Reply Quote 0
        • scottalanmillerS
          scottalanmiller
          last edited by

          And error too, of course.

          1 Reply Last reply Reply Quote 0
          • LakshmanaL
            Lakshmana
            last edited by

            Command properly done:
            [lakshmana@dny-lnx-zabbix ~]$ mysql -u root -ppass
            Welcome to the MariaDB monitor. Commands end with ; or \g.
            Your MariaDB connection id is 54
            Server version: 5.5.44-MariaDB MariaDB Server

            Copyright (c) 2000, 2015, Oracle, MariaDB Corporation Ab and others.

            Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

            MariaDB [(none)]>

            Error while the command used like this
            [lakshmana@dny-lnx-zabbix ~]$ mysql -u root -p pass
            Enter password:
            ERROR 1049 (42000): Unknown database 'pass'

            Error in the importing process:
            [lakshmana@dny-lnx-zabbix ~]$ mysql -u zabbixuser -ppass < /usr/share/doc/zabbix-server-mysql-2.4.5/create/schema.sql
            -bash: /usr/share/doc/zabbix-server-mysql-2.4.5/create/schema.sql: No such file or directory

            1 Reply Last reply Reply Quote 0
            • scottalanmillerS
              scottalanmiller
              last edited by

              You are missing the database name in the command. It doesn't know where to run the SQL commands.

              1 Reply Last reply Reply Quote 0
              • LakshmanaL
                Lakshmana
                last edited by

                How to change the password for the zabbix user by the Maria DB

                scottalanmillerS 1 Reply Last reply Reply Quote 0
                • scottalanmillerS
                  scottalanmiller @Lakshmana
                  last edited by

                  @Lakshmana said:

                  How to change the password for the zabbix user by the Maria DB

                  http://www.cyberciti.biz/faq/mysql-change-user-password/

                  1 Reply Last reply Reply Quote 0
                  • LakshmanaL
                    Lakshmana
                    last edited by

                    I have checked the details of the database and also teh username in mysql by the following command

                    [lakshmana@dny-lnx-zabbix ~]$ mysql -uroot -p
                    Enter password:
                    Welcome to the MariaDB monitor. Commands end with ; or \g.
                    Your MariaDB connection id is 76
                    Server version: 5.5.44-MariaDB MariaDB Server

                    Copyright (c) 2000, 2015, Oracle, MariaDB Corporation Ab and others.

                    Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

                    MariaDB [(none)]> select User from mysql.user;
                    +------------+
                    | User |
                    +------------+
                    | root |
                    | root |
                    | root |
                    | zabbixuser |
                    +------------+
                    4 rows in set (0.00 sec)

                    I have also changed the password the of the zabbixuser and tried to import the template the same error as shown above that is the errror is shown as
                    -bash: /usr/share/doc/zabbix-server-mysql-2.4.5/create/schema.sql: No such file or directory

                    scottalanmillerS 1 Reply Last reply Reply Quote 0
                    • scottalanmillerS
                      scottalanmiller @Lakshmana
                      last edited by

                      @Lakshmana said:

                      I have also changed the password the of the zabbixuser and tried to import the template the same error as shown above that is the errror is shown as
                      -bash: /usr/share/doc/zabbix-server-mysql-2.4.5/create/schema.sql: No such file or directory

                      These two things are not related. The user that you are using to import is root, not zabbix. The reason that the file does not exist is because it simply does not exist as we proved earlier.

                      The error is very explicit and obvious. The error tells you that the file does not exist. This should not have made you change a password.

                      1 Reply Last reply Reply Quote 1
                      • LakshmanaL
                        Lakshmana
                        last edited by Lakshmana

                        I can access both root and user from the terminal.
                        MariaDB is able to login from the terminal

                        scottalanmillerS 1 Reply Last reply Reply Quote 0
                        • scottalanmillerS
                          scottalanmiller @Lakshmana
                          last edited by

                          @Lakshmana said:

                          I can access both root and user from the terminal.
                          MariaDB is able to login from the terminal

                          Sure, access isn't an issue. The only issue I see is that you are trying to use a file that does not exist. Check the path, your path has a typo.

                          1 Reply Last reply Reply Quote 0
                          • LakshmanaL
                            Lakshmana
                            last edited by

                            I can see the files here in the path also
                            There are three files which can be accessed from the nano or vi editor

                            [lakshmana@dny-lnx-zabbix create]$ cd /usr/share/doc/zabbix-server-mysql-2.4.6/create/
                            [lakshmana@dny-lnx-zabbix create]$ ls
                            data.sql images.sql schema.sql
                            [lakshmana@dny-lnx-zabbix create]$

                            scottalanmillerS 1 Reply Last reply Reply Quote 0
                            • scottalanmillerS
                              scottalanmiller @Lakshmana
                              last edited by

                              @Lakshmana said:

                              I can see the files here in the path also
                              There are three files which can be accessed from the nano or vi editor

                              [lakshmana@dny-lnx-zabbix create]$ cd /usr/share/doc/zabbix-server-mysql-2.4.6/create/
                              [lakshmana@dny-lnx-zabbix create]$ ls
                              data.sql images.sql schema.sql
                              [lakshmana@dny-lnx-zabbix create]$

                              That's a different path than the one you used in the command! Use tab completion in your commands to help you get the paths correct.

                              1 Reply Last reply Reply Quote 0
                              • LakshmanaL
                                Lakshmana
                                last edited by

                                Yes,I have used the tab command only to search the path present.
                                I have also found the file which is inside the path specified.
                                Whether I need to copy the file in any /tmp path??

                                scottalanmillerS 1 Reply Last reply Reply Quote 0
                                • scottalanmillerS
                                  scottalanmiller @Lakshmana
                                  last edited by

                                  @Lakshmana said:

                                  Whether I need to copy the file in any /tmp path??

                                  Just use the correct path. This isn't complex. The path you used had a typo, fix the typo and all should be fine.

                                  1 Reply Last reply Reply Quote 0
                                  • LakshmanaL
                                    Lakshmana
                                    last edited by

                                    @scottalanmiller said:

                                    , fix the typo and a

                                    What is typo means?

                                    scottalanmillerS 1 Reply Last reply Reply Quote 0
                                    • scottalanmillerS
                                      scottalanmiller @Lakshmana
                                      last edited by

                                      @Lakshmana said:

                                      @scottalanmiller said:

                                      , fix the typo and a

                                      What is typo means?

                                      You have the wrong path when you run the command. When you look for the file, you have the right path. Compare the two and see what is different between them. You are not using tab completion for the command because the file you are trying to run does not exist.

                                      1 Reply Last reply Reply Quote 0
                                      • scottalanmillerS
                                        scottalanmiller
                                        last edited by

                                        Don't try to do anything else. The issue is that your file path is wrong by one character. Do nothing else until you figure out where that is wrong. You have all the information that you need just in this thread to know what the problem is. Trust the error, trust me when I tell you the error is correct. Fix the error. Don't go down a rabbit hole. This is the simplest problem that I can think of to have (getting a file name wrong). Don't look for complex answers to the simplest possible problems.

                                        1 Reply Last reply Reply Quote 1
                                        • LakshmanaL
                                          Lakshmana
                                          last edited by

                                          @scottalanmiller said:

                                          This

                                          ok.I will find the issue in the path as well as the issue

                                          1 Reply Last reply Reply Quote 0
                                          • LakshmanaL
                                            Lakshmana
                                            last edited by

                                            I have got help from Dafre for the issue in the template.I have used the command said by him and tried to do but there also came some error

                                            mysql -u root -p
                                            (enter the root password)
                                            then...
                                            use zabbixdb;
                                            source schema.sql;

                                            The error I got after typing source schema.sql is given below
                                            OR 1005 (HY000) at line 1420 in file: 'schema.sql': Can't create table 'zabbixdb.#sql-6d18_57' (errno: 121)
                                            ERROR 1005 (HY000) at line 1421 in file: 'schema.sql': Can't create table 'zabbixdb.#sql-6d18_57' (errno: 121)
                                            ERROR 1005 (HY000) at line 1422 in file: 'schema.sql': Can't create table 'zabbixdb.#sql-6d18_57' (errno: 121)
                                            ERROR 1005 (HY000) at line 1423 in file: 'schema.sql': Can't create table 'zabbixdb.#sql-6d18_57' (errno: 121)
                                            ERROR 1005 (HY000) at line 1424 in file: 'schema.sql': Can't create table 'zabbixdb.#sql-6d18_57' (errno: 121)
                                            ERROR 1005 (HY000) at line 1425 in file: 'schema.sql': Can't create table 'zabbixdb.#sql-6d18_57' (errno: 121)

                                            Why this error comes here ? Any idea

                                            1 Reply Last reply Reply Quote 0
                                            • 1
                                            • 2
                                            • 3
                                            • 4
                                            • 5
                                            • 6
                                            • 7
                                            • 2 / 7
                                            • First post
                                              Last post