For some reason, install mysql via homebrew was broken. You have to manually edit the mysql_config
.
The mysql_config file of homebrew stay in /usr/local/Cellar/mysql/5.6.12/bin
,
Open it with sudo
, around line 120, find these lines:
cflags="-I$pkgincludedir -Wall -Wno-null-conversion -Wno-unused-private-field -Os -g -fno-strict-aliasing -DDBUG_OFF -arch x86_64 " #note: end space!
cxxflags="-I$pkgincludedir -Wall -Wno-null-conversion -Wno-unused-private-field -Os -g -fno-strict-aliasing -DDBUG_OFF -arch x86_64 " #note: end space!
And remote -Wno-null-conversion -Wno-unused-private-filed
in both line like this:
cflags="-I$pkgincludedir -Wall -Os -g -fno-strict-aliasing -DDBUG_OFF -arch x86_64 " #note: end space!
cxxflags="-I$pkgincludedir -Wall -Os -g -fno-strict-aliasing -DDBUG_OFF -arch x86_64 " #note: end space!
Save the file and execute brew install mysql
again and it should work.
Check this blog post.