Posts by Oleg Ivanchenko

Yahoo Security Notice December 14, 2016

- by Oleg Ivanchenko

Yahoo has identified data security issues concerning certain Yahoo user accounts. Yahoo has taken steps to secure user accounts and is working closely with law enforcement.

More information here:

Tags: Hack Yahoo

SQLSTATE[HY000]: General error: 1364 Field doesn't have a default value

- by Oleg Ivanchenko

I have got an error:

	SQLSTATE[HY000]: General error: 1364 Field 'XXXX' doesn't have a default value

Happened with MySQL 5.7.12, Mac OS X 10.11.5. MySQL installed from a package from

The obvious solution does not work: adding default value into SQL code (default '') generates another error for a TEXT field:

	SQLSTATE[42000]: Syntax error or access violation: 1101 BLOB, TEXT, GEOMETRY or JSON column 'XXXX' can't have a default value

Thus I had to update MySQL settings. The default MySQL strict mode has to be disabled.

In my case there were no /etc/my.cnf file. The default settings were in /usr/local/mysql/support-files/my-default.cnf. I added /etc/my.cnf with the following code in it:


And of course MySQL should be restarted :-) Look here for more details.

It solved the problem.

MySQL start/stop/restart in Mac OS X

- by Oleg Ivanchenko

How to start/stop/restart MySQL in Mac OS X? Very easy!

In OS X Yosemite / El Capitan (MySQL post 5.7) run in terminal:

sudo launchctl load -F /Library/LaunchDaemons/

Note: This is a persistent setting which means that MySQL will automatically start on the next OS X start.

sudo launchctl unload -F /Library/LaunchDaemons/

In OS X pre Yosemite (MySQL pre 5.7) run in terminal:

 sudo /usr/local/mysql/support-files/mysql.server start
 sudo /usr/local/mysql/support-files/mysql.server stop
 sudo /usr/local/mysql/support-files/mysql.server restart

Quite easy :-)

SSH: Public Key - not in PubkeyAcceptedKeyTypes

- by Oleg Ivanchenko

After upgrading to OS X El Capitan and corresponding upgrade of MacPorts I faced a problem of ssh connection using a public key. While debugging:

$ ssh -v hostname

I have got:

debug1: Skipping ssh-dss key /Users/<user>/.ssh/id_dsa for not in PubkeyAcceptedKeyTypes

The fix was to add to ~/.ssh/config the following string:

PubkeyAcceptedKeyTypes ssh-css

However it was a good trigger to evaluate RSA vs. DSA usage for SSH authentication keys. A good topic for discussion ...