… but solved.
When trying to install WordPress 3.1 as a vanilla installation, it failed:
WordPress database error: [Invalid default value for 'comment_date']
… this got repeated for several columns in several tables and obviously table creation failed. However, WordPress reported success despite all the errors. Of course nothing worked. After turning to the #maria
channel over at irc.freenode.net
, I was smarter: sql_mode
was apparently set too strict.
I have installed 5.2.5-MariaDB-mariadb99~squeeze-log
and the default setting in my.cnf
was this:
sql_mode = NO_ENGINE_SUBSTITUTION,TRADITIONAL
… turns out that the TRADITIONAL
“expands” to several other restrictions, including NO_ZERO_IN_DATE
and NO_ZERO_DATE
and those seem to be the problem in that they cause the DB engine to not accept 0000-00-00 00:00:00
as a default datetime
value.
Given that WordPress – although it is clearly at fault here – is an application I wanted to run on this server, I decided to relax the sql_mode
and of course the installation succeeded after that. My new sql_mode
is:
sql_mode = NO_ENGINE_SUBSTITUTION
Hope it helps someone else.
// Oliver
Same problem here, fixed 😛
Thanks!
Whew! Thanks for this fix, it works great.
It may be somewhere on the wordpress site, but do you know if this is gonna be fixed in wp? Clearly those of us who support FOSS want to support Maria…
Thanks again!
Glad it helped someone 😉
So glad that’s all it was. Googled bits of that first mysql error during my wordpress install along with “mariadb” and landed here. Fix worked! Thanks!
Hehe, yeah I panicked as well first. But then I realized that the problem was solvable. At least blogging about it seems to have helped others 😉
Thanks for this. I was having some issues with a vBulletin install, so tried to install WordPress, had same error, Googled landed here.
Unfortunately it didn’t resolve my vBulletin install errors, but no doubt it was one of the issues!
Cheers.