Home >Database >Mysql Tutorial >一招遍天下无mysql密码_MySQL

一招遍天下无mysql密码_MySQL

WBOY
WBOYOriginal
2016-06-01 13:42:01901browse

bitsCN.com 一招遍天下无mysql密码 昨天涛哥开始上了MySQL 才发现偶的密码忘记... mysql忘记密码,如何重置密码有很多套方法,但本人觉得最简单而快捷方法的如下:
 1.在my.ini的[mysqld]字段加入:skip-grant-tables
 2.重启mysql服务,这时的mysql不需要密码即可登录数据库,然后进入mysqlmysql>use mysql;    mysql>updata user set password=password('新密码') WHERE User='root';mysql>flush privileges;
 3.运行之后最后去掉my.ini中的skip-grant-tables,重启mysql即可。   作者 zdrjlamp bitsCN.com

Statement:
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