1:苹果->系统偏好设置->最下边点mysql 在弹出页面中 关闭mysql服务

2: Start it in safe mode

进入终端

输入:

cd /usr/local/mysql/bin/

回车后 登录管理员权限

sudo su

回车后输入以下命令来禁止mysql验证功能

./mysqld_safe --skip-grant-tables &

 

3) Open another terminal and run the following command (Keep last terminal open)

mysql -u root

4) Run the following command with suitable new password on the mysql console

mysql > UPDATE mysql.user SET Password=PASSWORD('password') WHERE User='root';

5) mysql > FLUSH PRIVILEGES;

6) Quit from both terminals and open new terminal and connect to mysql with root user and new password

mysql -uroot -p

最新文章

  1. 给linux添加yum源。
  2. centos 7.0 修改ssh默认连接22端口 和 添加防火墙firewalld 通过端口
  3. adding validation annotators to model classes 在linq to EntityFrame的Model中添加前台验证validation annotators
  4. wordpress页面前端添加编辑按钮
  5. npm获取配置,设置代理
  6. 恢复oracle中误删除drop掉的表
  7. OpenSUSE SuSEfirewall2
  8. Docker部署JavaWeb项目实战(转)
  9. Puppent 介绍原理及安装
  10. Section 1.1 Your Ride Is Here
  11. Python Linear algebra
  12. Unable to resolve dependency问题解决
  13. 记一次SpringBoot 开发中所遇到的坑和解决方法
  14. java json 转换
  15. 关于 IdentityServer 部署到生产环境相关问题踩坑记录
  16. 《ERP系统修正数据的sql文件》
  17. Solidity通过合约转ERC20代币
  18. ELASTIC制图等高级使用
  19. Linux修改系统主机名
  20. [数据结构]最大流之Ford-Fulkerson算法

热门文章

  1. Java数组直接选择排序、sort()排序
  2. JAVA遇见HTML——JSP篇:JSP内置对象(下)
  3. 注册表操作 Microsoft.Win32.Registry与RegistryKey类
  4. 关于b站爬虫的尝试(二)
  5. //点击按钮加减音频音量到最小会出现bug什么意思???
  6. string::at
  7. select([[data],fn])
  8. FileInputStream读取的两种方法:逐字节读;以字节数组读取
  9. 034_非交互自动生成 SSH 密钥文件
  10. WSDL的学习