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

  • SEARCH
  • Home
  • 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 7496809
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T18:47:52+00:00 2026-05-29T18:47:52+00:00

phpMyAdmin will not allow me to add a new field to my database —

  • 0

phpMyAdmin will not allow me to add a new field to my database — the new field is:

Field: itemCount
Type:  INT
Length: 5
Default: 'As Defined:'  1
AUTO_INCREMENT: yes

The error I get from phpMyAdmin is:

Error

SQL query:

ALTER TABLE `useritems` CHANGE `itemCount` `itemCount` INT( 5 ) NOT NULL DEFAULT '1' AUTO_INCREMENT

MySQL said: #1067 - Invalid default value for 'itemCount' 

(note: the single quotes around the ‘1’ in the error message are not mine — I simply type 1
into phpMyAdmin for the new field.)

I don’t get why I can create an INT, ‘auto-increment’ field but phpMyAdmin says “you can’t set an INT to a default value of 1”

I tried setting it to zero, same error.
I tried making this the primary key field; and I tried it without making the field the primary key. Same error.

How do I get phpMyAdmin to allow me to create an INT field that is auto-increment with a default value of 1 or zero?

  • 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-29T18:47:54+00:00Added an answer on May 29, 2026 at 6:47 pm

    By default, for any auto-increment column, the counting starts from 1. If you want to set it to anything higher than that, you may use following Alter query:

    ALTER TABLE mytable AUTO_INCREMENT = value;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm setting up a database using PHPMyAdmin and many fields will be large chunks
Will someone PLEASE show me what I'm doing wrong? I'm new to using phpMyAdmin
In phpMyAdmin I have a char(32) column that has no default value(ie. Default: None).
I have just installed phpMyAdmin on my new Fedora Core 10 dedicated server. I
I'm using PHPMyAdmin and I've got a MySQL table column called timestamp. The type
It seems to me that phpMyAdmin imports tables by default with collation latin1_swedish_ci, how
It's very strange because phpmyadmin is not in document root, but still can visit
I'm working on an ASP.NET MVC site which will have a database. While I'm
I've a problem to configure database settings in Drupal. I will propose here some
I have one database in mysql. But when i log into phpMyAdmin , it

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.