• Recent
    • Unsolved
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    Change group ID number?

    Scheduled Pinned Locked Moved Unsolved
    FOG Problems
    4
    8
    725
    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.
    • V
      vince.villarreal
      last edited by

      So I made 2 groups, deleted them, and now the numbering order starts at 3.

      is there an easy way to switch the number counter back to 1?

      Wayne WorkmanW 1 Reply Last reply Reply Quote 0
      • Wayne WorkmanW
        Wayne Workman @vince.villarreal
        last edited by Wayne Workman

        @vince-villarreal If you have no groups at all, this will work: ALTER TABLE groups AUTO_INCREMENT = 1; but if you have any groups at all, this will probably break stuff.

        Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!
        Daily Clean Installation Results:
        https://fogtesting.fogproject.us/
        FOG Reporting:
        https://fog-external-reporting-results.fogproject.us/

        V 1 Reply Last reply Reply Quote 0
        • V
          vince.villarreal
          last edited by

          so I am a noob, where do I type that in at? (tried in mysql)

          1 Reply Last reply Reply Quote 0
          • V
            vince.villarreal
            last edited by

            @wayne-workman said in Change group ID number?:

            ALTER TABLE groups AUTO_INCREMENT = 1;

            also I am using Maria DB not MYSQL

            1 Reply Last reply Reply Quote 0
            • V
              vince.villarreal @Wayne Workman
              last edited by

              @wayne-workman so I type in console:

              mysql fog

              ALTER TABLE groups AUTO_INCREMENT = 1;

              nothing happens

              Then i try it with the \G command at the end (\G = send command to mysql server)

              it throws back:

              Query OK, 0 rows affected
              Records: 0 Duplicates: 0 Warnings: 0
              ERROR: No query specified

              george1421G Tom ElliottT Wayne WorkmanW 3 Replies Last reply Reply Quote 0
              • george1421G
                george1421 Moderator @vince.villarreal
                last edited by

                @vince-villarreal said in Change group ID number?:

                Query OK, 0 rows affected
                Records: 0 Duplicates: 0 Warnings: 0
                ERROR: No query specified

                This message is expected based on your query (it ran OK). You didn’t update or select any rows from the database. You altered a table descriptor.

                Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!

                1 Reply Last reply Reply Quote 1
                • Tom ElliottT
                  Tom Elliott @vince.villarreal
                  last edited by

                  @vince-villarreal I’ll ad \G should not be used with ;, for example: alter table fog.groups auto_increment = 1\G; is trying to run two separate queries, one for the alter table and one that is blank, hence the error no query message.

                  \G is a means to display columns in a vertical format where ; will show each row horizontally.

                  Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG! Get in contact with me (chat bubble in the top right corner) if you want to join in.

                  Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

                  Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

                  1 Reply Last reply Reply Quote 1
                  • Wayne WorkmanW
                    Wayne Workman @vince.villarreal
                    last edited by

                    @vince-villarreal Try to add a group and see what the ID is.

                    Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!
                    Daily Clean Installation Results:
                    https://fogtesting.fogproject.us/
                    FOG Reporting:
                    https://fog-external-reporting-results.fogproject.us/

                    1 Reply Last reply Reply Quote 0
                    • 1 / 1
                    • First post
                      Last post

                    153

                    Online

                    12.0k

                    Users

                    17.3k

                    Topics

                    155.2k

                    Posts
                    Copyright © 2012-2024 FOG Project