Mac使用brew(Homebrew)安装mysql,附 Mac Nacicat Premium 破解版
一、准备工作
当我写下这篇笔记时,我的系统版本是 macOS 10.13.6
成功安装的mysql版本是 8.0.12
1. 安装 Homebrew
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
复制上面内容直接在终端运行即可
二、安装 & 配置 MySQL
1. 安装 MySQL
在终端输入一下内容即可进行安装
brew install mysql
2. MySQL 配置
安装好 MySQL 后,需要进行初始化配置,先熟悉一下 启动和停止 MySQL 的方法:
启动:brew services staert mysql
重启:brew services restaert mysql
停止:brew services stop mysql
查看版本:brew info mysql
注:所有通过 brew 安装的软件,都可以使用以上4条命令进行操作和查看
在启动了 MySQL 后,在控制台输入 mysql_secure_installation
然后开始进行初始化
cometdeMacBook-Pro:~ comet$ mysql_secure_installation
Securing the MySQL server deployment.
Connecting to MySQL using a blank password.
VALIDATE PASSWORD PLUGIN can be used to test passwords
and improve security. It checks the strength of password
and allows the users to set only those passwords which are
secure enough. Would you like to setup VALIDATE PASSWORD plugin?
Press y|Y for Yes, any other key for No: N // 这个选yes的话密码长度就必须要设置为8位以上,但我只想要6位的
Please set the password for root here.
New password: // 设置密码
Re-enter new password: // 再一次确认密码
By default, a MySQL installation has an anonymous user,
allowing anyone to log into MySQL without having to have
a user account created for them. This is intended only for
testing, and to make the installation go a bit smoother.
You should remove them before moving into a production
environment.
Remove anonymous users? (Press y|Y for Yes, any other key for No) : Y // 移除不用密码的那个账户
Success.
Normally, root should only be allowed to connect from
'localhost'. This ensures that someone cannot guess at
the root password from the network.
Disallow root login remotely? (Press y|Y for Yes, any other key for No) : n //不接受root远程登录账号
... skipping.
By default, MySQL comes with a database named 'test' that
anyone can access. This is also intended only for testing,
and should be removed before moving into a production
environment.
Remove test database and access to it? (Press y|Y for Yes, any other key for No) : y //删除text数据库
- Dropping test database...
Success.
- Removing privileges on test database...
Success.
Reloading the privilege tables will ensure that all changes
made so far will take effect immediately.
Reload privilege tables now? (Press y|Y for Yes, any other key for No) : y
Success. // 立即重新加载权限表
All done!
三、使用 Nacicat Premium 管理 MySQL
1. 安装破解版 Nacicat Premium (汉化可选)
软件:链接: https://pan.baidu.com/s/1OPccSQlA9JrS5vPOpd-7RA 密码: n725
中文包:链接: https://pan.baidu.com/s/1g7CWF5q2lhVsLqC9_frOZw 密码: qwqj
汉化:安装完之后:应用程序右键–>显示包内容–>打开/Contents/Resources–>复制中文包”zh-Hans.lproj”放入
2. 连接管理 MySQl
使用 Nacicat Premium 连接 MySQL 会报错
ERROR 2059 (HY000): Authentication plugin ‘caching_sha2_password’ cannot be loaded;
这是因为最新安装的 MySQL8 使用的密码校验规则是 caching_sha2_password
,我们需要改成 mysql_native_password
打开终端,输入:
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '{替换成你的密码}';
( 将汉字替换成你的密码 )
更多推荐
所有评论(0)