Home > Database > Mysql Tutorial > 安恒网管员手记: mysql密码忘记的修改_MySQL

安恒网管员手记: mysql密码忘记的修改_MySQL

WBOY
Release: 2016-06-01 13:55:35
Original
1078 people have browsed it

网管员

如果 MySQL 正在运行,首先杀之: killall -TERM mysqld。

启动 MySQL :/usr/bin/safe_mysqld --skip-grant-tables &

就可以不需要密码就进入 MySQL 了。

然后就是

>use mysql
>update user set password=password("new_pass") where user="root";
>flush privileges;

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

Redhat的safe_mysqld在/usr/bin下, 而使用tarball缺省安装在/usr/local/bin下。

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