MyBB Community Forums

Full Version: Important: If you are getting a lot of mySQL errors
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
If you are getting a lot of mySQL errors and running mySQL version 5.0.0 or later (especially 5.0.22) try this out.

Basically the idea is to turn off "strict mode" a new operating mode which makes all of the table entries need to have completed values otherwise it throws an error (which is quite often in myBB version 1.7).

To check which mode you are operating in, run the query:


select @@global.sql_mode;


if it says STRICT_TRANS_TABLES (it might have some other stuff also)

try this query:


set @@global.sql_mode="ansi"


Then check your mybb forum.  It might fix the problems, plus allows for a looser syntax table entry method.

I struggled with many mySQL errors for this problem for 1 1/5 - 2 months then this one command fixed almost all of them ( I didn't know that this was the problem then, though)!!!

Here is the thread that talks about it more: http://community.mybboard.net/showthread.php?tid=11611c

Here is the mySQL reference manual section which describes the operating modes (its quite good!). http://dev.mysql.com/doc/refman/5.0/en/s...-mode.html

Thanks, Hope that helps!
Just a comment to make on this post. Strict mode is NOT a problem. Strict mode is just something that was introduced into mySQL version 5 to try to create better standards for using the database.

The problems actually are in the older query code which leaves items undefined which mySQL doesn't like now, or with items that are not defined properly.

I believe much of this is being fixed for future releases.
Most, if not all of the queries have been updated to be compatible with MySQL 5 in strict mode in MyBB 1.2
SnakEyez Wrote:Just a comment to make on this post.  Strict mode is NOT a problem.  Strict mode is just something that was introduced into mySQL version 5 to try to create better standards for using the database.

The problems actually are in the older query code which leaves items undefined which mySQL doesn't like now, or with items that are not defined properly.

I believe much of this is being fixed for future releases.

Sorry, thats what I meant.  I just was trying to explain that a lot of the errors are due to myBB code that Strict mode doesnt like.