- 官网下载mysql@5.7
image.png
image.png
image.png
image.png
image.png
出现安装 一直安装就可以了
- 官网下载mysql@5.7
image.png注意出现下面的一定要截图保存
- 打开系统偏好设置,会发现多了一个MySQL图标,点击它,会进入MySQL的设置界面:
image.png有的同学不要急,发现自己那没有MySQL入口,请继续往下看,有解决方案
image.png
- 配置mysql 全局变量
vim ~/.bash_profile
进入vim 书写
首先输入 i 代表咱们准备书写了
第二步 书写一下内容
export PATH="$PATH:/usr/local/mysql/bin"
第三步 按 esc 键 再输入:x 回车
第四步
source ~/.bash_profile
- 解决mysql 未能载入偏好设置面板“MySQL”问题
sudo rm /usr/local/mysql
sudo rm -rf /usr/local/mysql*
sudo rm -rf /Library/StartupItems/MySQLCOM
sudo rm -rf /Library/PreferencePanes/MySQL*
sudo rm -rf ~/Library/PreferencePanes/MySQL*
sudo rm -rf /Library/Receipts/mysql*
sudo rm -rf /Library/Receipts/MySQL*
重新安装,应该就会有了
*重置密码
输入刚刚安装让大家保存的密码
mysql -uroot -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 7
Server version: 5.7.28
Copyright (c) 2000, 2019, 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>
修改密码
set PASSWORD =PASSWORD('root');
网友评论