标签:服务 alter flush tables 5.7 where ges localhost div
先停止mysql服务
//停止表权限 cd /usr/local/mysql/bin/ ./mysqld_safe --skip-grant-tables &
直接mysql 进入数据库
update mysql.user set authentication_string=password(‘newpassword‘) where user=‘root‘ and Host = ‘localhost‘;
flush privileges
使用新密码进入数据库后任何操作都会提示:
ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement.
//你必须重置您的密码使用ALTER USER语句之前执行这
执行:
SET PASSWORD = PASSWORD(‘newpassword‘);
即可!
标签:服务 alter flush tables 5.7 where ges localhost div
原文地址:http://www.cnblogs.com/jackylee92/p/6227924.html