mysqlパスワードを取り戻す

488 ワード

/etc/init.d/mysql stop#mysqlデータベースの停止
# mysqld_safe --user=mysql --skip-grant-tables --skip-networking & #        MySQL
# mysql -u root     #  root  mysql   ,           ,       
# use mysql;         #     mysql
# update user set password=PASSWORD('qq543842005') where user='root';  #  root    
# flush privileges;  #    
# quit    #  mysql
# /etc/init.d/mysql restart   #  mysql
# mysql -u root -p    #         

mysql 5.7以上、以上の方法は適用されません.