1.解决mysql无法登录的问题: 在/etc/my.cnf文件中添加skip-grant-tables 2.设置登录密码不对: cd /var/log cat mysql.log|grep ‘password’