教你如何在Mac上安装mysql数据库
作者:朱先忠老师 时间:2024-01-23 05:19:10
下载mysql for mac: https://downloads.mysql.com/archives/community/
注意:我下载的是社团版本,mysql版本要和你的MAC版本保持一致。当然,如果以前安装过其他的MYSQL版本,务必先卸载了。
双击mysql-8.0.0-dmr-osx10.11-x86_64.dmg进行解压, 安装。
Continue -> Continue, Agree -> Install。记录下来弹窗中的密码。
进入系统偏好设置, 找到mysql, 启动服务
将mysql的命令添加到系统中
(1).进入/usr/local/mysql/bin,查看此目录下是否有mysql
(2).执行vim ~/.bash_profile
在该文件中添加mysql/bin的目录
PATH=$PATH:/usr/local/mysql/bin
添加完成后,按esc,然后输入wq保存。
(3).最后在命令行输入source ~/.bash_profile
通过mysql -uroot -p登录mysql, 输入之前保存的密码
重置mysql初始密码:
SET PASSWORD FOR 'root'@'localhost' = PASSWORD('newpassword');
来源:http://blog.51cto.com/zhuxianzhong/2113811
标签:Mac,mysql
![](/images/zang.png)
![](/images/jiucuo.png)
猜你喜欢
Python学习之运算符号
2023-11-29 04:11:04
python实现m3u8格式转换为mp4视频格式
2021-05-09 00:48:02
![](https://img.aspxhome.com/file/2023/4/101174_0s.png)
python 将numpy维度不同的数组相加相乘操作
2022-03-26 06:14:06
![](https://img.aspxhome.com/file/2023/5/93425_0s.jpg)
Python实现字符串反转的常用方法分析【4种方法】
2022-01-05 04:08:08
MySQL中的count(*) 和 count(1) 区别性能对比分析
2024-01-24 03:12:51
![](https://img.aspxhome.com/file/2023/5/93055_0s.png)
如何在网页设计中使用个性化字体
2009-07-07 11:29:00
![](https://img.aspxhome.com/file/UploadPic/20097/7/170342di6-78s.png)
Python学习之字典的创建和使用
2023-12-14 17:43:30
![](https://img.aspxhome.com/file/2023/3/123643_0s.png)
详解Python变量与注释高级用法
2022-08-06 08:17:08
Tensorflow中tf.ConfigProto()的用法详解
2022-01-12 03:33:25
jQuery中$.ajax的实现解析
2008-07-20 13:11:00
pyqt 实现QlineEdit 输入密码显示成圆点的方法
2022-04-16 05:15:55
![](https://img.aspxhome.com/file/2023/9/120289_0s.jpg)
Python进程池Pool应用实例分析
2022-02-22 16:46:01
python爬虫把url链接编码成gbk2312格式过程解析
2023-04-26 21:00:10
![](https://img.aspxhome.com/file/2023/8/105698_0s.png)
在ASP与ASP.NET之间共享对话状态(2)
2008-09-02 12:21:00
纯CSS实现导航下拉菜单
2007-11-25 15:11:00
![](https://img.aspxhome.com/file/UploadPic/200711/25/2007112515291686s.gif)
在Python文件中指定Python解释器的方法
2023-06-24 13:22:50
sql exist的妙用
2007-11-08 11:47:00
Python的Twisted框架上手前所必须了解的异步编程思想
2021-05-02 14:21:44
![](https://img.aspxhome.com/file/2023/8/69068_0s.png)
go语言实现二叉树的序例化与反序列化
2024-04-26 17:27:30
![](https://img.aspxhome.com/file/2023/2/134082_0s.webp)
Python实现计算AUC的三种方式总结
2021-07-10 23:35:32
![](https://img.aspxhome.com/file/2023/6/133616_0s.jpg)