当前位置:网站首页>Mac 中 MySQL 的安装与卸载
Mac 中 MySQL 的安装与卸载
2022-07-30 14:26:00 【web18484626332】
MySQL 的安装与卸载
MySQL 的卸载
在 Mac 中可以在系统偏好设置 中查看 MySQL 的状态,其路径默认在/usr/local下,可以按照以下步骤删除干净 MySQL
关闭 MySQL,在
系统偏好设置中点击 MySQL,然后点击Stop MySQL Server

打开终端,切换到 usr 目录下,
open usr在
/local目录中依次卸载 MySQL 相关文件sudo rm /usr/local/mysql
sudo rm -rf /usr/local/mysql*
sudo rm -rf /Library/StartupItems/MySQLCOM
sudo rm -rf /Library/PreferencePanes/My*
rm -rf ~/Library/PreferencePanes/My*
sudo rm -rf /Library/Receipts/mysql*
sudo rm -rf /Library/Receipts/MySQL*
sudo rm -rf /var/db/receipts/com.mysql.*查看
系统偏好设置,此时 MySQL 已被删除
MySQL 的安装
- 进入 MySQL 社区版,下载对应系统、版本的MySQL安装包,注意不要下载压缩包,在 GA 的右侧 Archives 可以下载旧版本的 MySQL

- 下载完安装包后,一路单击 next, 8.0.28 版本可以预先配置密码,但之前有些版本有默认密码需要先记住再在终端修改



MySQL 的配置
- 安装完成后在
系统偏好设置可以看见 MySQL 图标,点击后在Configuration能看见 MySQL 配置文件存储位置

- 配置系统的环境变量 此时直接在终端输入
mysql,会出现command not found
(1) 先在终端cd /usr/local/mysql/bin查看 mysql 安装情况
(2) 添加路径
- 在终端中
open ~/.bash_profile - 文件中添加语句
PATH=$PATH:/usr/local/mysql/bin,保存 source ~/.bash_profile
- 登陆
MySQL,在终端输入mysql -uroot -p,之后输入密码即可登录
边栏推荐
- Metaverse Post Office AI space-themed series of digital collections will be launched at 10:00 on July 30th "Yuanyou Digital Collection"
- 超T动力 盈运天下——中国重汽黄河/豪沃WP14T产品首发荣耀上市!
- LeetCode_98_验证二叉搜索树
- 桌面软件开发框架大赏
- Meta首份元宇宙白皮书9大看点,瞄准80万亿美元市场
- 【元胞自动机】基于元胞自动机模拟生命演化、病毒感染等实例附matlab代码
- Redis6.0 source code learning (5) ziplist
- 如何在 TiDB Cloud 上使用 Databricks 进行数据分析 | TiDB Cloud 使用指南
- Container sorting case
- 我为何从开发人员转做测试,3年软件测试工程师,带你聊聊这其中的秘辛
猜你喜欢

Understand Chisel language. 28. Chisel advanced finite state machine (2) - Mealy state machine and comparison with Moore state machine

华为再发「天才少年」召集令!曾放弃360万年薪的他也来首秀

5. DOM

为什么做软件测试一定要学自动化?谈谈我眼中自动化测试的价值

国内数字藏品的乱象与未来

5. DOM

How to use Databricks for data analysis on TiDB Cloud | TiDB Cloud User Guide

Teach you how to write an eye-catching software testing resume, if you don't receive an interview invitation, I will lose

3年软件测试经验面试要求月薪22K,明显感觉他背了很多面试题...

A new generation of open source free terminal tools, so cool
随机推荐
学习 MySQL 需要知道的 28 个小技巧
Allure Advanced - Dynamically Generate Report Content
时序数据库在船舶风险管理领域的应用
EasyV数字孪生流域|宁波智慧水利整体智治综合应用
The main content of terrain analysis (the special effect level of the wandering earth)
新时代背景下智慧城市的建设与5G技术有何关联
00 testers of seasoning after nearly a year, whether to change careers or to learn the software testing students summarized the following heart advice
Flask Framework - Flask-Mail Mail
浅析显卡市场的未来走向:现在可以抄底了吗?
机器学习在竞赛和工业界应用区别
【回归预测-lssvm分类】基于最小二乘支持向量机lssvm实现数据分类代码
跳槽前,把自己弄成卷王
postgresql的普通字符串和转义字符串
那些破釜沉舟入局Web3.0的互联网精英都怎么样了?
三电系统集成技术杂谈
MongoDB启动报错 Process: 29784 ExecStart=/usr/bin/mongod $OPTIONS (code=exited, status=14)
打破原则引入SQL,MongoDB到底想要干啥?
ToDesk版本更新,引入RTC传输技术,是否早以替代向日葵远程控制?
3 years of software testing experience, the interview requires a monthly salary of 22K, obviously he has memorized a lot of interview questions...
智能合约安全——私有数据访问