Disabling MySQL Strict Mode on OS X
Another useful tidbit for someone (or possibly my future self).
MySQL did not like the default value for my datetime fields when running an import command.
`created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00'
To resolve the issue, I had to do a few things, the first is enabling MySQL commands from the terminal. I usually use Navicat Premium as it's got a great UI and with all my bookmarked connections I can visually switch between them at will. Should the need arise, you can enable the mysql
command from your terminal use the following;
$ echo 'export PATH=/usr/local/mysql/bin:$PATH' >> ~/.bash_profile
$ . ~/.bash_profile
That should enable MySQL, so now to login and fix the issue; which is that MySQL by default has strict mode enabled.
$ mysql -u{username} -p
$ set sql_mode=NO_ENGINE_SUBSTITUTION; set global sql_mode=NO_ENGINE_SUBSTITUTION;
Voila! No more import issue.