美文网首页
mac 安装redis、mysql、MongoDB

mac 安装redis、mysql、MongoDB

作者: Darker_坤 | 来源:发表于2019-08-28 12:18 被阅读0次

    redis 安装

    • brew install redis

    启动

    • brew services start redis(后台启动)
    • redis-server /usr/local/etc/redis.conf (非后台启动)

    mysql 安装

    • brew install mysql

    启动

    • brew services start mysql(后台启动)
    • mysql.server start(非后台启动)
    • 没有详细的配置文件,可参考其他系统下的my.cnf进行自我配置



      1、我们在没有root 密码的情况下安装了您的MySQL数据库。确保它运行:mysql_secure_installation
      2、登录mysql: mysql -uroot
      3、如果忘记密码:

    cd /usr/local/bin/mysql/
    ./mysqld_safe --skip-grant-tables &  # 禁止mysql验证功能 
    ./mysql  # 进入mysql
    FLUSH PRIVILEGES; 
    SET PASSWORD FOR 'root'@'localhost' = '你的新密码';
    
    4、
    ALTER USER root@localhost IDENTIFIED WITH mysql_native_password BY ‘你的密码’;
    

    mongodb 安装

    • brew install mongodb

    启动

    • brew services start mongodb (后台启动)
    • mongod --config /usr/local/etc/mongod.conf (非后台启动)

    相关文章

      网友评论

          本文标题:mac 安装redis、mysql、MongoDB

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