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

Mysql重设密码_MySQL

WBOY
Release: 2016-06-01 13:12:52
Original
1024 people have browsed it

在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
Copy after login

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

Related labels:
source:php.cn
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template