#service mysqld stop
#mysqld_safe –skip-grant-tables &
#mysql -u root
#use mysql
#update user set password=password(‘33230′) where user=’root';
#flush privileges;
如果按以上操作之前遇到密码无效出现,可我的密码明明没有错啊?今天终于找到了原因,是权限问题错误提示:
Access denied for user ‘root’@’localhost’ (using password: YES)从错误中可以看出权限是对localhost的访问没有放开。
按以上方法在来一次最好在执行:
#grant all privileges on *.* to ‘root’@’localhost’ identified by ‘33230’ with grant option;
#flush privileges;