Home > Database > Mysql Tutorial > linux忘记mysql密码处理方法_MySQL

linux忘记mysql密码处理方法_MySQL

WBOY
Release: 2016-06-01 13:21:11
Original
1133 people have browsed it

bitsCN.com linux忘记mysql密码处理方法:

# /etc/init.d/mysql stop
# mysqld_safe --user=mysql --skip-grant-tables --skip-networking &
# mysql -u root mysql
mysql> update user set password=password('newpassword') where user='root';
mysql> flush privileges;
mysql> quit
# /etc/init.d/mysql restart
# mysql -uroot -p
enter password:
mysql>

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