brew install mysql

cd . ; /usr/local/opt/mysql/bin/mysqld_safe &

#修改root密码

 

/usr/local/Cellar/mysql/5.6.27/bin/mysqladmin -u root password 'new-password'

#安装初始的数据库

mysql_install_db --verbose --user=`whoami` \

--basedir="$(brew --prefix mysql)" \

--datadir=/usr/local/var/mysql --tmpdir=/tmp

相关推荐