-
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安装
-
使用默认配置一路下一步安装,在最后会提示设置密码
-
Finsh安装完成。
-
打开终端,为Path路径附加MySQL的bin目录
PATH="$PATH":/usr/local/mysql/bin -
然后通过以下命令登陆MySQL
mysql -u root -p -
输入密码,就是刚才设置的密码,这个跟之前的版本不一样,之前的版本是输入安装过程中记录的一个临时密码,现在我这个版本是8.0.16不需要临时密码了。
-
最后运行命令 mysql> show databases 没有错误
-
使用Navicat或Sequel pro第一次连接MySQL连接不上,在系统配置中打开MySQL配置,点击Initialize Database后,输入密码初始化一下数据库就可以连接上了。
Node.js和React和MySQL安装-macos
最新推荐文章于 2023-08-20 22:33:34 发布