china-flint

首先关闭正在运行的mysqld进程

  1. 执行mysqld_safe --skips-grant-tables & 
  2. 双击enter 键进入命令行模式
  3. 执行 mysql
  4. linux 系统执行:update mysql.user set password = password(\'root\') where user = \'root\' and host = \'localhost\';
  5. mac 系统执行:update mysql.user set authentication_string=password(\'root\') where user = \'root\' and host = \'localhost\';
  6. 刷新权限:flush privileges;
  7. 退出:quit
  8. 杀死mysqld进程,然后重新连接 :mysql -uroot -proot 
  9. 完成

分类:

技术点:

相关文章: