查看mysql版本
lihudeMacBook-Pro:~ SunAndLi$ mysql --version
错误:
-bash: mysql: command not found
lihudeMacBook-Pro:bin SunAndLi$ sudo ln -fs /usr/local/mysql/bin/mysql mysql
进入mysql
lihudeMacBook-Pro:bin SunAndLi$ mysql -u root -p
开启log
mysql> set global general_log=on;
查询log的位置
mysql> show variables like 'general_log_file';
重启mysql
lihudeMacBook-Pro:StartupItems SunAndLi$ sudo /usr/local/mysql/support-files/mysql.server restart