首页 > 数据库 >Mac | HomeBrew 安装 & 配置 MySQL

Mac | HomeBrew 安装 & 配置 MySQL

时间:2023-04-06 14:37:17浏览次数:39  
标签:... installation Success MySQL Mac mysql HomeBrew password

这个是我最新并且一直推崇的方法:
1、安装:brew install mysql

2、开启mysql:mysql.server start

3、使用mysql的配置脚本:/usr/local/opt/mysql/bin/mysql_secure_installation //mysql 提供的配置向导
启动这个脚本后,即可根据如下命令提示进行初始化设置

14:14:49 with koshkaaaa in ~ took 4.5s
✦6 ➜ mysql_secure_installation // 执行脚步

Securing the MySQL server deployment.
Connecting to MySQL using a blank password.
VALIDATE PASSWORD PLUGIN can be used to test passwordsand 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: k //是否采用mysql密码安全检测插件(这里作为演示选择否,密码检查插件要求密码复杂程度高,大小写字母+数字+字符等)
Please set the password for root here. // 首次使用自带配置脚本,设置root密码

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 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? [Y/n] 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? [Y/n] Y //是否禁止远程登录
 ... Success!

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? [Y/n] Y //删除测试数据库,并登录
 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? [Y/n] Y//重新载入权限表
 ... Success!

All done!  If you've completed all of the above steps, your MySQL
installation should now be secure.

Thanks for using MySQL!

Cleaning up...

标签:...,installation,Success,MySQL,Mac,mysql,HomeBrew,password
From: https://www.cnblogs.com/RioTian/p/17292633.html

相关文章

  • 面试突击MySQL:高并发情况下,数据库该如何设计?
    转载:http://blog.itpub.net/70000181/viewspace-2776766/面试题剖析为什么要分库分表?(设计高并发系统的时候,数据库层面该如何设计?)说白了,分库分表是两回事儿,大家可别搞混了,可能是光分库不分表,也可能是光分表不分库,都有可能。我先给大家抛出来一个场景:假如我们现在是一个小创业公......
  • glib gmacros.h
    /*GLIB-LibraryofusefulroutinesforCprogramming*Copyright(C)1995-1997PeterMattis,SpencerKimballandJoshMacDonald**Thislibraryisfreesoftware;youcanredistributeitand/or*modifyitunderthetermsoftheGNULesserGeneral......
  • canal 同步mysql到rocketMQ
    https://github.com/alibaba/canal/wiki/canal介绍https://github.com/alibaba/canal/releases地址:Mysql172.31.100.133066rocketMQhttp://172.31.100.1:8181Canal-adminhttp://172.31.100.2:8089/admin123456一、Mysql5.7配置(1)###拉取镜像mysql5.7dockerp......
  • 书评《MySQL必知必会》
    对数据库基本无了解的我,打算了解一下数据库/SQL的功能操作,于是想选一本讲数据库操作的书,看到网络上最推荐的书籍就是——《SQL必知必会》和《MySQL必知必会》。这两本书有什么区别?《SQL必知必会》只讲SQL,《MySQL必知必会》除了讲SQL,还针对MySQL讲了一些知识。考虑到《MySQL必知必会......
  • 无备份情况下恢复MySQL truncate table
    近期陆续有客户遇到MySQL的数据库问题,最近正好开始研究MySQL的一些技术。大家都知道我之前是擅长Oracle恢复,如果不会MySQL数据库恢复,总感觉却少一点什么。既然如此,就顺道研究一下吧。幸运的是,Google能够发现一些针对MySQL的恢复文章以及一些工具。我们都知道,MySQLServer都很多存......
  • MySQL中的行转列和列转行
    参考:[MySQL中的行转列和列转行-墨天轮](https://www.modb.pro/db/74028)行转列与列转行的概念什么是行转列什么是列转行行转列实验示例示例一:使用聚合函数示例二:使用group_concat函数示例三:使用动态SQL语句块列转行实验示例示例一:使用unionall......
  • 力扣626(MySQL)-换座位(中等)
    题目:表: Seat编写SQL查询来交换每两个连续的学生的座位号。如果学生的数量是奇数,则最后一个学生的id不交换。按 id 升序 返回结果表。查询结果格式如下所示。示例1: 解释:请注意,如果学生人数为奇数,则不需要更换最后一名学生的座位。解题思路:①交换座位号是交换相......
  • 31.mysql查看所有索引
    当对大表进行数据迁移时,往往索引是个大问题,不但用时较长,且容易造成锁表,此时针对某些情况,就可以先备份索引信息,然后删除原表索引,数据迁移完成之后,再重建索引SELECTCONCAT('ALTERTABLE`',TABLE_NAME,'`',......
  • 关于mysql的and和or
    写了一个查询语句结果踩坑了,这个and和or分不清楚谁的优先级高在页面上看到了已经被删除的数据,我就知道糟了。话不读说直接看代码<selectid="listByUsPage"resultType="com.wuling.product.domain.TaskInfo">select*from(select*fromproject_......
  • Blender网格建模插件MESHmachine倒角和圆角:扁平 化
    推荐:将NSDT场景编辑器加入你的3D工具链编辑模式ye使用拼合工具,您可以拼合单个或多个多边形,并且可以在2种模式下展平:沿边或沿法线。选择展平可以采取2种选择。您可以选择 3个折点或多个多边形,其中一个处于活动状态。如果选择3个顶点,则连接多边形的所有顶点都将根据3个顶点......