时间:2021-07-01 10:21:17 帮助过:4人阅读
启动:
sudo /usr/local/mysql/support-files/mysql.server start
停止:
sudo /usr/local/mysql/support-files/mysql.server stop
还是比较麻烦,可以简化一下:在~/.bash_aliases中添加这样的命令:
alias mysqlstart=‘sudo /usr/local/mysql/support-files/mysql.server start‘
alias mysqlstop=‘sudo /usr/local/mysql/support-files/mysql.server stop‘
如果没有.bash_aliases文件,可以创建一个,并在.bash_profile文件的最后加上这样的代码:
if [ -f ~/.bash_aliases ]; then
. ~/.bash_aliases
fi
Mac下命令行启动Mysql
标签: