1) 修改etc/my.cnf: [mysqld]项下加一句 skip-grant-tables 2) mysql.server restart 3) 进入MySQL, 修改 mysql.user 表的root密码