oygg

今天在学习的时候,突然忘记了MySQL的密码,简直无奈,百度一下,终于解决怎样查看原密码的问题,记录一下。

一、启动命令行,输入: taskkill /f /im mysqld.exe  //关闭mysql

二、转入mysql的bin目录下

三、输入:mysqld --skip-grant-tables    // 跳过密码检测

四、原窗口不关闭,新打开一个,转入mysql的bin目录下

五、输入:mysql -u root

六、查看原来密码:select host,user,password from mysql.user;、

  修改原来密码:update mysql.user set password=\'这里填写你要设置的密码\'  where user=\'root\';

 

分类:

技术点:

相关文章:

  • 2021-04-17
  • 2021-10-10
  • 2021-12-27
  • 2021-04-15
  • 2021-12-19
  • 2021-12-15
  • 2021-11-20
  • 2021-11-28
猜你喜欢
  • 2021-10-10
  • 2021-11-24
  • 2021-10-10
  • 2021-12-15
  • 2021-11-24
  • 2021-07-31
相关资源
相似解决方案