Home > Database > Mysql Tutorial > mysql忘记密码重置_MySQL

mysql忘记密码重置_MySQL

WBOY
Release: 2016-06-01 13:45:20
Original
748 people have browsed it

bitsCN.com

1、关闭mysql
      /etc/init.d/mysqld stop
2、启动mysql不加载授权表
      /usr/local/mysql/bin/mysqld_safe --defaults-file=/etc/my.cnf --skip-grant-tables &
      这时进入mysql不需要密码
      #mysql -uroot
      mysql>use mysql;
      mysql>update user set Password=password('!@#,abc354') where User='root';
      把mysql密码修改为!@#,bac354
3、重启mysql
      /etc/init.d/mysqld restart
      用新密码进入mysql
      #mysql -uroot -p!@#,abc354


作者“linux运维”

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