MyBB Community Forums

Full Version: SQL Error: 1364 - Field 'passwordconvert' doesn't have a default value
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Detailed description of your problem, including steps to reproduce if necessary:

After moving to a new host, there is an issue with user registrations. Everything else appears to be working fine.

URL to your forum/URL to specific problematic page:

www.clanbbf.com

New installation or upgrade (from which version of MyBB)?:

Was originally a merge from mybb back in Jan. with whatever version of 1.6 was out then. I've done all updates since then except this new 1.6.5 without issue. I am still on 1.6.4.

Test user account (if a posting/UserCP issue):

Try creating a user and you'll see the error.

Screenshot or error text, verbatim:

Quote:MyBB SQL Error


MyBB has experienced an internal SQL error and cannot continue.

SQL Error: 1364 - Field 'passwordconvert' doesn't have a default value Query: INSERT INTO mybb_users (username,password,salt,loginkey,email,postnum,avatar,avatartype,usergroup,additionalgroups,displaygroup,usertitle,regdate,lastactive,lastvisit,website,icq,aim,yahoo,msn,birthday,signature,allownotices,hideemail,subscriptionmethod,receivepms,receivefrombuddy,pmnotice,pmnotify,showsigs,showavatars,showquickreply,showredirect,tpp,ppp,invisible,style,timezone,dstcorrection,threadmode,daysprune,dateformat,timeformat,regip,longregip,language,showcodebuttons,away,awaydate,returndate,awayreason,notepad,referrer,referrals,buddylist,ignorelist,pmfolders,warningpoints,moderateposts,moderationtime,suspendposting,suspensiontime,coppauser,classicpostbit,usernotes) VALUES ...
It continues on with the values from the new user.


The issue seems to be the empty table item it tries to insert into with no value since it's not one of the old phpbb accounts from the merge?


Assistance would be greatly appreciated.

Run the 1.6.5 update.
(2011-11-30, 11:22 AM)mohdows Wrote: [ -> ]Run the 1.6.5 update.

No.

It appears you used the merge system. If i am correct goto your phpMyAdmin and run the following query:

ALTER TABLE `mybb_users` CHANGE `passwordconvert` `passwordconvert` VARCHAR( 255 ) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL 

Of course, change mybb_ to your database prefix.

If that doesn't work let us know
Booher,

It didn't let me change the collate to that and use NULL. I had tried that through phpmyadmin already.




We're running mysql 5.5 because it is 2011, not 1998. There should always be a default value or NULL though, not blank right?. I hope there aren't further issues.




What fixed it so far is changing the config.php to use mysql instead of mysqli:
$config['database']['type'] = 'mysql';


Is there anything else I'll want to change?


Also, I would like to change it back to mysqli again if possible, especially if there is a benefit in doing so with mybb.


You can only use MySQLi if your server actually is MySQLi. So many people aren't understanding this Toungue
(2011-11-30, 05:46 PM)Dylan M. Wrote: [ -> ]You can only use MySQLi if your server actually is MySQLi. So many people aren't understanding this Toungue

Correct me if I'm wrong, but MySQLi isn't a MySQL server, but rather the PHP extension added, which it appears to be with the new host.

I don't think the latest version of MySQL with strict mode features enabled likes blank values inserted with no default value when you're using whatever it is was being used when mysqli was set in the configuration.

Just a thought...but I'm not a programmer or DB guy.

It's working now.
Did you get that response Dylan? You may want to update your merge to set some sort of default value in those table items.