mysql登录错误: mysql管理员:连接服务器本地故障
error : ' accessdeniedforuser ' root ' @ ' localhost ' (using password 3360是) '
解决方法: #servicemysqldstop
# mysqld _ safe-- skip-grant-tables
键入mysql-uroot-p返回enter
usemysql;
udateusersetpassword=password (' new pass ' ) whereuser='root );
将密码更改为新密码
flush权限; 更新访问权限
退出队列
servicemysqldrestart
将输入mysql-uroot-p的新密码
二、忘记本地路由的登录密码
解决流程:
1、编辑/etc/my.cnf
将skip-grant-tables行添加到“[mysqld]”配置部分
2、保存后,重新启动MySQL [ root @ localhost etc ] # servicemysqlrestart
shuttingdownmysql.[确定]
starting MySQL.[确定]
3、登录数据库重置根密码[根@ localhost~~ ] # MySQL-uroot-p MySQL
Enterpassword:
直接回车上去。