mac book 安装MySQL

macOS上安装并配置MySQL
本文指导您如何在macOS系统上通过Homebrew安装MySQL,并详细介绍了MySQL服务的启动、停止方法及设置密码的步骤。

mac book 安装MySQL

参考:https://easyengine.io/tutorials/mac/osx-brew-php-mysql-nginx/

Installing MySQL on Mac OS X

Run following command:

brew install mysql --enable-debug

In case you need mysql-workbench, please download it from here. It cannot be installed via brew.

 

MySQL服务管理

Manual Start/Stop

Start mysql: /usr/local/mysql/support-files/mysql.server start

Stop mysql: /usr/local/mysql/support-files/mysql.server stop

See other options – /usr/local/mysql/support-files/mysql.server -h 

Usage: mysql.server {start|stop|restart|reload|force-reload|status} [ MySQL server options ]

比如启动MySQL服务:

localhost:Downloads whuanghkl$ mysql.server start

Starting MySQL

 

. SUCCESS! 

 

设置MySQL密码

Changes to MySQL Config (optional)

For security
 
Run following command to improve security of your mysql setup. It will present you wizard to set mysql root password among other things.
mysql_secure_installation

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值