通过运行“sudo vi /etc/bashrc”,在bash的配置文件中加入mysql和mysqladmin的别名
#mysql
alias mysql=‘/usr/local/mysql/bin/mysql‘
alias mysqladmin=‘/usr/local/mysql/bin/mysqladmin‘
启动Mysql服务
sudo /Library/StartupItems/MySQLCOM/MySQLCOM start
停止Mysql服务
sudo /Library/StartupItems/MySQLCOM/MySQLCOM stop
重启Mysql服务
sudo /Library/StartupItems/MySQLCOM/MySQLCOM restart