国语自产精品视频在线看:您身边最放心的安全下载站! 最新软件|热门排行|软件分类|软件专题|厂商大全

国语自产精品视频在线看

技术教程
您的位置:首页数据库类MySQL → 解决mysql忘记密码

解决mysql忘记密码

我要评论 2011/03/25 17:07:37 来源:国语自产精品视频在线看 编辑:绿色资源站 [ ] 评论:0 点击:250次

  mysql有时候【yǒu shí hòu】忘记密💖码了怎【mǎ le zěn】么办?我给出🌸案例和说明【shuō míng】!一下就解决了🔴!

  Windows下的实际操作如下

  1.关闭正在运行的MySQL。

  2.打开🐎DOS窗口【chuāng kǒu】,转到【zhuǎn dào】mysql\bin目录🚔。

  3.输入mysqld --skip-grant-tables回车【huí chē】💇。如果没🍎有出现【yǒu chū xiàn】提示信【tí shì xìn】😰息,那就对了。

  4.再开一个【gè】DOS窗口【chuāng kǒu】(因为刚才那个【gè】🔻DOS窗口已【chuāng kǒu yǐ】经不能动了😬),转到👴mysql\bin目录。

  5.输入🤯mysql回车🌬,如果成功【gōng】,将出现【jiāng chū xiàn】MySQL提示符 >

  6. 连接权限数据💚库【kù】>use mysql; (>是本来【shì běn lái】🏷就有的【jiù yǒu de】提示符,别忘了最后的分号😻)

  6.改密码:> update user set password=password("520") where user="root"; (别忘了【bié wàng le】🎠最后的【zuì hòu de】🎼分号)

  7.刷新权【shuā xīn quán】限【xiàn】(必须的⤵步骤😎)>flush privileges;

  8.退出 > \q

  9.注销系⬛统【tǒng】,再进入,开MySQL,使用用【shǐ yòng yòng】户名root和刚才🎻设置的新密码【xīn mì mǎ】👖123456登陆。

  第一步

  C:\Documents and Settings\Administrator>cd D:\web\zbbingyang.com\Mysql\MySQL Se

  rver5.5\bin

  C:\Documents and Settings\Administrator>d:

  D:\web\zbbingyang.com\Mysql\MySQL Server5.5\bin>mysqld --skip-grant-tables

  第二步

  Microsoft Windows [版本【bǎn běn】🐫 5.2.3790]

  (C) 版权所有【yǒu】🚀 1985-2003 Microsoft Corp.

  C:\Documents and Settings\Administrator>cd D:\web\zbbingyang.com\Mysql\MySQL Se

  rver5.5\bin

  C:\Documents and Settings\Administrator>d:

  D:\web\zbbingyang.com\Mysql\MySQL Server5.5\bin>mysql

  Welcome to the MySQL monitor. Commands end with ; or \g.

  Your MySQL connection id is 1

  Server version: 5.5.10 MySQL Community Server (GPL)

  Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.

  Oracle is a registered trademark of Oracle Corporation and/or its

  affiliates. Other names may be trademarks of their respective

  owners.

  Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

  mysql> use mysql;

  Database changed

  mysql> update user set password=password("520") where user="root";

  Query OK, 1 row affected (0.00 sec)

  Rows matched: 1 Changed: 1 Warnings: 0

  mysql> flush privileges;

  Query OK, 0 rows affected (0.00 sec)

  mysql> \q

  Bye

  D:\web\zbbingyang.com\Mysql\MySQL Server5.5\bin>

关键词:mysql

阅读本文后您有什么感想? 已有 人给出评价!

  • 0 欢迎喜欢
  • 0 白痴
  • 0 拜托
  • 0 哇
  • 0 加油
  • 0 鄙视