安装mysql + redis

使用 homebrew 安装 mysql

brew install mysql

安装成功后
运行

mysql -u root

-u的意思是user,用户名默认为root。
mysql -u 用户名 -p 密码 是连接数据库服务器的命令。要求你输入自己连接数据库的用户名和密码。
考虑密码如果直接明文写在这条命令行上,有些不方便(怕被别人看到),可以像你写的那样,只输入:mysql -u 用户名 -p 然后回车,此时提示你输入密码,这时候输入的密码就不再是明文的了。

dodoroMBP:~ dodoro$ mysql -uroot
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 11
Server version: 8.0.11 Homebrew

Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> 

也可以去mysql官网下载最新版,安装即可,比较不会出错。

下一步:安装可视化工具

我安装的是navicat premium破解版,因为看网上说对于数据量大的时候展示比较好。
试用后再来更新啦~

安装redis

很简单啦,就是

brew install redis

大功告成~

你可能感兴趣的:(安装mysql + redis)