Home > Database > Mysql Tutorial > 丢失MySQL root 密码?_MySQL

丢失MySQL root 密码?_MySQL

WBOY
Release: 2016-06-01 13:34:28
Original
1114 people have browsed it

bitsCN.com

1 先停止掉 MYSQL 服务

/etc/init.d/mysqld stop
Copy after login

2 使用 mysqld_safe 安全登录

mysqld_safe --skip-grant-tables &
Copy after login

3 执行登录,修改密码等

mysql -u -rootuse mysql;update user set password=password('your new password') where user='root';exit;
Copy after login

4 重新启动MySQL服务

/etc/init.d/mysqld start
Copy after login

 

bitsCN.com
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