Mac下命令行启动Mysql

启动:

sudo/usr/local/mysql/support-files/mysql.server start

停止:

sudo/usr/local/mysql/support-files/mysql.server stop

还是比较麻烦,可以简化一下:在~/.bash_aliases中添加这样的命令:

aliasmysqlstart='sudo /usr/local/mysql/support-files/mysql.server start'aliasmysqlstop='sudo /usr/local/mysql/support-files/mysql.server stop'

如果没有.bash_aliases文件,可以创建一个,并在.bash_profile文件的最后加上这样的代码:

if[-f~/.bash_aliases ];then. ~/.bash_aliasesfi

你可能感兴趣的:(Mac下命令行启动Mysql)