Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6004543
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T01:16:40+00:00 2026-05-23T01:16:40+00:00

i have an existing mysql table with the id column defined as primary, and

  • 0

i have an existing mysql table with the id column defined as primary, and auto-increment set as true. now, i would like to know if i can set the auto-increment to start from a predefined value, say 5678, instead of starting off from 1.

I would also like to know if i can set the steps for auto-incrementing, say increase by 15 each for each new record insertion (instead of the default increment value of 1).

Note- i am using phpmyadmin to play with the db, and i have many tables but only one db.

Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T01:16:41+00:00Added an answer on May 23, 2026 at 1:16 am

    You can also use the server-system-variables:

    auto_increment_increment

    and

    auto_increment_offset

    This will allow you to increase the offset by other values than 1 (e.g. 15) each time.
    If you start from a different value using the same offset on a different server. This will allow you to keep tables on different servers that can be merged without keys overlapping.

    e.g.

    (inc = 15 offset = 1)          (inc=15 offset = 2)
    table1 on server A             table1 on server B
    -----------------------------------------------------
    id     name                    id    name
    1      bill                    2     john
    16     monica                  17    claire 
    ....
    

    This can be very useful.

    Because the main usage is to have the same table on different servers behave in a different way, it is a server setting and not a table setting.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have added a new enum column, enum('true','false') in an existing MySQL table. What
I have an existing C++ project on a linux environment, and would like to
I have data stored in a mySQL table under the column type timestamp that
I have two already-existing tables which look (in part) roughly like this: CREATE TABLE
I have an existing database with the table Transactions in it. I have added
I have an existing PHP/MySQL application that I want to convert over to CakePHP.
I have a pre-existing mysql database containing around 50 tables. Rather than hand code
I have a flat list of pages in a mySQL Table. ID | Tab
I have a table in my Mysql database, which is used for authentication. And
I have a table with 45 millions from a mysql DB, i want to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.