mac 本地安装mysql_mac 本地安装mysql服务

本文介绍了如何在Mac上使用Homebrew安装MySQL,并启动服务。通过`mysql.server start`或`brew services start mysql`来启动MySQL服务。此外,还提到了`mysql_secure_installation`命令用于配置和增强MySQL的安全性,包括设置root用户的密码、移除匿名用户和测试数据库。
摘要由CSDN通过智能技术生成

安装

brew install mysql

启动mysyql服务

mysql.server start

也可以启动后台服务 ,开机后自动重启

brew services start mysql

mysql的相关配置

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:

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

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值