mac 安装redis、mysql、MongoDB

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 (非后台启动)
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。