MacBook 安装 MySQL 5.7.29(新手都看得懂的安装教程)
发布日期:2021-05-09 04:51:43 浏览次数:14 分类:博客文章

本文共 1186 字,大约阅读时间需要 3 分钟。

第一步:找到安装包地址 ——

第二步:找到 MySQL 5.7.29 版本

第三步: 点击下载对应的.dmg文件

第四步:点击下载后,会跳转到另一个页面

第五步:下载完成后,双击 mysql-5.7.29-macos10.14-x86_64.dmg 文件,进行安装

第六步:点击继续

第七步:点击继续

第八步:点击同意

第九步:点击安装(可以更换安装位置,不知道的可以不用理会,直接点击安装),等待安装

第十步:安装完成后,到摘要这里时,点击关闭即可。

第十一步:点击方框中的图标

第十二步:点击“Start MySQL Server”

点击后可以看到如下图所示:

第十三步:启动完成后,打开终端,输入如下内容,然后按回车键

alias mysql=/usr/local/mysql/bin/mysql

第十四步:输入如下内容,然后按回车键

alias mysqladmin=/usr/local/mysql/bin/mysqladmin

第十五步:修改密码(示例:修改为12345678)

mysqladmin -u root -p password 12345678

备注:

MySQL5.7版本密码设置MySQL 设置的密码中必须至少包含一个大写字母、一个小写字母、一个特殊符号、一个数字,密码长度至少为8个字符

第十六步:终端进入MySQL

输入如下,输入后按回车即可

mysql -u root -p12345678

备注:

用户名为:root密码为:12345678

出现如下类似情况,说明进入成功:

mysql: [Warning] Using a password on the command line interface can be insecure.Welcome to the MySQL monitor.  Commands end with ; or \g.Your MySQL connection id is 284Server version: 5.7.29 MySQL Community Server (GPL)Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.Oracle is a registered trademark of Oracle Corporation and/or itsaffiliates. Other names may be trademarks of their respectiveowners.Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.mysql>

如果要退出,输入"quit"即可

上一篇:Macbook 彻彻底底的卸载MySQL
下一篇:Java 中的注解

发表评论

最新留言

能坚持,总会有不一样的收获!
[***.219.124.196]2025年03月31日 07时54分43秒