Node.js和React和MySQL安装-macos

  • Node.js 安装
    参照https://www.runoob.com/nodejs/nodejs-install-setup.html

  • React安装-适用于MacOS
    https://www.robinwieruch.de/react-js-macos-setup/

  • First, check whether the Node.js installation for MacOS was successful.
    node -version
    ​​​​​​​npm -version

  • Install your first node package with npm on the command line.
    npm install -g create-react-app

  • Check its version again on the command line.
    create-react-app --version

  • Finally, you can bootstrap your first React.js application on MacOS. You can use create-react-app by passing the name of your application to it on the command line.
    create-react-app my-app

  • Afterward, you can navigate into the project on the command line and start it with npm:
    cd my-app
    npm start
    On my macbook, it will automatically open Chrome and redirect the page to http://localhost:3000/

  • MySQL安装

  • 下载最新社区版本 https://dev.mysql.com/downloads/mysql/

  • 使用默认配置一路下一步安装,在最后会提示设置密码
    设置密码

  • Finsh安装完成。

  • 打开终端,为Path路径附加MySQL的bin目录
    PATH="$PATH":/usr/local/mysql/bin

  • 然后通过以下命令登陆MySQL
    mysql -u root -p

  • 输入密码,就是刚才设置的密码,这个跟之前的版本不一样,之前的版本是输入安装过程中记录的一个临时密码,现在我这个版本是8.0.16不需要临时密码了。

  • 最后运行命令 mysql> show databases 没有错误
    showdatabasse

  • 使用Navicat或Sequel pro第一次连接MySQL连接不上,在系统配置中打开MySQL配置,点击Initialize Database后,输入密码初始化一下数据库就可以连接上了。
    在这里插入图片描述

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值