I just setup vagrant and vccw and tried to import a database dump from my production server via wp-cli.
This unfortunately failed with the message Invalid default value for 'comment_date' datetime field.
I googled this error and found that this was due to MySql strict mode, which apparently is on by default.
The fix for this, according to this website is to include the setting
sql_mode=ONLY_FULL_GROUP_BY,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
under the tag [mysqld]
in the file /etc/mysql/mysql.conf.d/mysqld.cnf
This fixed it for me, but do I have to repeat this every time a new vccw environment is set up? Or is it possible to disable the mysql strict mode by default?
Operating System: Windows 10 Vagrant Version: 1.9.2 Virtual Box Version: 5.1.14r112924
I just setup vagrant and vccw and tried to import a database dump from my production server via wp-cli. This unfortunately failed with the message
Invalid default value for 'comment_date' datetime field.
I googled this error and found that this was due to MySql strict mode, which apparently is on by default.The fix for this, according to this website is to include the setting
sql_mode=ONLY_FULL_GROUP_BY,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
under the tag[mysqld]
in the file
/etc/mysql/mysql.conf.d/mysqld.cnf
This fixed it for me, but do I have to repeat this every time a new vccw environment is set up? Or is it possible to disable the mysql strict mode by default?