Mac下Mysql重置密码
Contents
系统环境
MacOs 13.4.1 (c) (22F770820d)
1.停止mysql service
1 | sudo /usr/local/mysql/support-files/mysql.server stop |
2.开启mysql的”安全模式”
1 | cd /usr/local/mysql/bin/ |
3.刷新权限 &修改密码
1 | FLUSH PRIVILEGES; |
4.重启mysql,登录验证是否成功
1 | sudo /usr/local/mysql/support-files/mysql.server restart |