php - MYSQL auto increment becomes corrupt -


for reason i'm having issue after while table turns "corrupt" guess error:

mysql failed read auto-increment value storage engine 

i found solution run following query:

alter table `users`  auto_increment = 1 

the bad part randomly occurred 3 times far in 3 weeks without me altering in table. reason found out hearing user unable register :/

this query run register new user, can see doesn't insert user_id obviously

insert users (user_name, user_lastip, user_password_hash, user_email, user_activation_hash, user_registration_ip, user_registration_datetime)  values(:user_name, :user_lastip ,:user_password_hash, :user_email, :user_activation_hash, :user_registration_ip, now()) 

here quick screenshot of table:

(i had user_id length set 11 before started happen , tried setting 255 last time error occurred didn't help) table image

does know causing or how fix this? i'm not 1 having problem there has logical explanation hope

check autoincrement_offset. try drop table, create new table.


Comments

Popular posts from this blog

asp.net mvc - SSO between MVCForum and Umbraco7 -

Python Tkinter keyboard using bind -

ubuntu - Selenium Node Not Connecting to Hub, Not Opening Port -