mysql忘记密码

###mysql忘记密码###

vim /etc/my.cnf
	skip_grant_tables

systemctl restart mysqld

mysql
	mysql>select host,user, from mysql.user
	mysql>update mysql.user set authentication_string=password("密码") where user=“root”;
	
	vim /etc/my.cnf
		#skip_grant_tables
	
	systemctl restart mysql
	
	mysql -uroot -p更改后的密码
		mysql>alter user root@'localhost' identified by '改密码';

···

你可能感兴趣的:(mysql忘记密码)