Heim >Datenbank >MySQL-Tutorial >Linux 和 Windows下 MySQL 丢失密码解决方案

Linux 和 Windows下 MySQL 丢失密码解决方案

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-06-07 16:56:421035Durchsuche

在Windows和Linux下mysql丢失密码不用着急,www.Linuxidc.com教您解决方案! Windows下1.先结束MySQL进程和服务2.CMD进入MySQL的

Linux公社

首页 → 数据库技术

背景:

阅读新闻

Linux 和 Windows下 MySQL 丢失密码解决方案

[日期:2010-05-01] 来源:MySQL社区  作者:MySQL [字体:]

在Windows和Linux下mysql丢失密码不用着急,教您解决方案!
 
Windows下
1.先结束MySQL进程和服务
2.CMD进入MySQL的bin目录,输入mysqld-nt.exe --skip-grant-tables回车,
这个窗口放着不要关
3.然后再开一个CMD窗口进入MySQL的bin目录
4.输入:
mysql
use mysql;
update user set password=password('自己设置的密码') where user='root';
flush privileges;
exit
 
Linux下
1.service mysqld stop 用kill杀死mysqld进程
2.打开终端输入:
/usr/bin/mysqld_safe -- skip-grant-tables & mysqld-nt --skip-grant-tables
大要关闭
3.继续打开一个终端输入:
mysql
use mysql;
update user set password=password('自己设置的密码') where user='root';
flush privileges;
exit
4.service mysqld restart 即可

linux

  • 0
  • Linux下升级Oracle 10

    介绍CentOS MySQL安装编译使用

    相关资讯       mysql 

    图片资讯      

    本文评论   查看全部评论 (0)

    评论声明

    最新资讯

    本周热门

    Linux公社简介 - 广告服务 - 网站地图 - 帮助信息 - 联系我们
    本站(LinuxIDC)所刊载文章不代表同意其说法或描述,,仅为提供更多信息,也不构成任何建议。


    Copyright © 2006-2011 Linux公社 All rights reserved 浙ICP备06018118号

    Stellungnahme:
    Der Inhalt dieses Artikels wird freiwillig von Internetnutzern beigesteuert und das Urheberrecht liegt beim ursprünglichen Autor. Diese Website übernimmt keine entsprechende rechtliche Verantwortung. Wenn Sie Inhalte finden, bei denen der Verdacht eines Plagiats oder einer Rechtsverletzung besteht, wenden Sie sich bitte an admin@php.cn