2019年1月17日星期四

mac安装mysql

参考https://gist.github.com/operatino/392614486ce4421063b9dece4dfe6c21

Install brew services first : $ brew tap homebrew/services

Load and start the MySQL service : $ brew services start mysql@5.7
Expected output : Successfully started mysql (label: homebrew.mxcl.mysql)

Check of the MySQL service has been loaded : $ brew services list

Force link 5.7 version - $ brew link mysql@5.7 --force

Verify the installed MySQL instance : $ mysql -V

安装完成后mysql配置读取顺序默认为:/etc/my.cnf /etc/mysql/my.cnf /usr/local/etc/my.cnf ~/.my.cnf

找到相应的文件,修改配置,然后brew services restart mysql@5.7

2019年1月11日星期五

tensorflow的c++ so编译问题

tensorflow1.6的二进制包是用gcc4编译的,bazel在gcc5上使用到tensorflow的库的话编译会有问题,如下:


如果需要在gcc5上兼容tensorflow库,需要在编译选项中加上 bazel build --cxxopt="-D_GLIBCXX_USE_CXX11_ABI=0"