MyBB Community Forums

Full Version: 1062 - Duplicate entry '0' for key 'uid'
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
MyBB SQL Error
MyBB has experienced an internal SQL error and cannot continue.

SQL Error:
1062 - Duplicate entry '0' for key 'uid'
Query:
REPLACE INTO mybbqz_sessions SET uid=0,sid='5f3a9e068cd413e80226baba956f0eda',time=1593535323,ip=X'b75325e5',location='/index.php?',useragent='Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.116 Safari/537.36',location1=0,location2=0,nopermission=0
Please contact the MyBB Group for technical support.

This is the error message I am receiving. What should I do to fix this issue?
Thank you!
Check your session table whether uid is set as PRIMARY KEY. It should not be.
What's the context?  Normal operation or after a DB restore?

cheers...
(2020-06-30, 07:17 PM)effone Wrote: [ -> ]Check your session table whether uid is set as PRIMARY KEY. It should not be.

Or marked as unique.