Home >Database >Mysql Tutorial >Mysql重设密码_MySQL

Mysql重设密码_MySQL

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-06-01 13:12:521081browse

在linux下:

如果 MySQL 正在运行,首先杀之: killall -TERM mysqld。
启动 MySQL :bin/safe_mysqld –skip-grant-tables &
就可以不需要密码就进入 MySQL 了。
然后就是

  >use mysql  >update user set password=password("new_pass") where user="root";  >flush privileges  >use mysql >update user set password=password("new_pass") where user="root"; >flush privileges;启动/apps/svr/mysql5/support-files/mysql.server restart

重新杀 MySQL ,用正常方法启动 MySQL 。

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