mac下brew 安装mysql和启动mysql

安装

brew install mysql

安装完其实会有一堆提示,按照提示操作即可。

这里记录一下,如果已经安装,但是mysql服务挂了,那么按照这个重新启动。

==> mysql

We've installed your MySQL database without a root password. To secure it run:

    mysql_secure_installation

MySQL is configured to only allow connections from localhost by default

To connect run:

    mysql -uroot

To have launchd start mysql now and restart at login:

  brew services start mysql

Or, if you don't want/need a background service you can just run:

  mysql.server start

你可能感兴趣的:(mac下brew 安装mysql和启动mysql)