暝殇叶
非正常方式起动mysql,/usr/local/mysql/bin/mysqld_safe –skip-grant-tables &不需要密码进入mysql,/usr/local/mysql/bin/mysql -u root -p (要求输入密码时直接回车即可)然后就是>use mysql;>update user set password=password("输入新的密码") where user="root";>flush privileges; 重新杀掉mysql进程,用正常方法启动mysql,一切OK