Home > Database > Mysql Tutorial > Linux 和 Windows下 MySQL 丢失密码解决方案

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

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-07 16:56:42
Original
1038 people have browsed it

在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号

    Related labels:
    Statement of this Website
    The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
    Latest Issues
    MySQL stops process
    From 1970-01-01 08:00:00
    0
    0
    0
    Error when installing mysql on linux
    From 1970-01-01 08:00:00
    0
    0
    0
    phpstudy cannot start mysql?
    From 1970-01-01 08:00:00
    0
    0
    0
    Popular Tutorials
    More>
    Latest Downloads
    More>
    Web Effects
    Website Source Code
    Website Materials
    Front End Template