美文网首页
install mysql server in mac

install mysql server in mac

作者: 芒鞋儿 | 来源:发表于2020-08-08 21:48 被阅读0次

    好像一般mysql server都装在cloud,而本地一般装workbench等client tool,不过有时候为了调试程序方便,也得装一下server.
    虽然可以下载包安装,但是用brew 安装好像也蛮省事的。

    1. brew search mysql
    2. brew install mysql
      会出现以下msg:
    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
    

    3.mysql.server start 运行mysql
    4.执行 mysql_secure_installation
    根据提示选择password 种类,并设置pwd, 以及其他选项设置,

    1. mysql -u root -p
      用刚才的pwd 进入即可。

    相关文章

      网友评论

          本文标题:install mysql server in mac

          本文链接:https://www.haomeiwen.com/subject/ctkkdktx.html