ERROR 1227 (42000): Access denied; you need (at least one of) the PROCESS privilege(s) for this oper
1 用以往的mysql登陆模式登陆
[mysql@eanintmydbc002db1 mysqllog]$ mysql
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 3157186
Server version: 5.5.25a-log MySQL EA Release
Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> select current_user();
+----------------+
| current_user() |
+----------------+
| @localhost |
+----------------+
1 row in set (0.01 sec)
mysql>
mysql>
2 奇怪,再次登陆试试看
[mysql@xxxmydbc002db1 mysqllog]$ mysql
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 3157145
Server version: 5.5.25a-log MySQL EA Release
Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> show processlist;
ERROR 1227 (42000): Access denied; you need (at least one of) the PROCESS privilege(s) for this operation
mysql> select current_user();
+----------------+
| current_user() |
+----------------+
| @localhost |
+----------------+
1 row in set (0.00 sec)
看到这里竟然没有用户名,只有ip地址为localhost,好诡异的状况,看下当前所有的进程
mysql> show full processlist;
ERROR 1227 (42000): Access denied; you need (at least one of) the PROCESS privilege(s) for this operation
mysql>
3 去用标准的登陆模式mysql -uroot -p -hlocalhost登陆试下,看看问题到底在哪里。
[novamysqladminint@xxmydbc002db1 ~]$ mysql -uroot -p -hlocalhost
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 3257823
Server version: 5.5.25a-log MySQL EA Release
Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> select user,host from mysql.user;
+--------------+-------------------------------------+
| user | host |
+--------------+-------------------------------------+
| mmm_agent | % |
| mmm_monitor | % |
| replication | % |
| root | % |
| root | 127.0.0.1 |
| root | ::1 |
| | localhost | 有这个用户的,那就查下用户到底是啥权限.
| nuc_monitor | xx.xx.abn-iad.xx.com |
| nuc_monitor | xx.xx.abn-iad.xx.com |
+--------------+-------------------------------------+
23 rows in set (0.00 sec)
mysql> show grants for ''@'localhost';
+--------------------------------------+
| Grants for @localhost |
+--------------------------------------+
| GRANT USAGE ON *.* TO ''@'localhost' | 看到这里,这个用户只赋予了useage权限,可以connect上面,但是做不了任何操作。
+--------------------------------------+
1 row in set (0.00 sec)
mysql>
解决方案:这个表示你的权限已经被收回了.但是user表里面还有你的记录.你需要做的是,重新赋予这个用户权限或者 drop掉这个无用的帐号换一个标准的帐号登陆。
Why ?
在binlog里面去查看了操作记录以及自己平时的工作记录,发现当时一个同事在清理帐号的时候,remove了''@'localhost'的权限,但是没有drop 掉这个用户,所以在默认mysql登陆的时候,优先选择了''@'localhost',而不是用'root'@'localhost',但是问题来了,为什么执行mysql会优先用''@'localhost'帐号登陆,而不用'root'@'localhost'登陆呢?
ERROR 1227 (42000): Access denied; you need (at least one of) the PROCESS privilege(s) for this oper的更多相关文章
- ERROR 1227 (42000): Access denied; you need (at least one of) the SUPER privilege(s) for this operation
开启super权限: 1. update user set Super_priv=‘Y’ where User=‘root’2. flush privileges
- ERROR 1044 (42000): Access denied for user 'root'@'localhost' to database 'mysql'
mysql> use mysqlERROR 1044 (42000): Access denied for user 'root'@'localhost' to database 'mysql' ...
- ERROR 1044 (42000): Access denied for user ''@'localhost' to database 'db'
1.问题 在刚刚安装MySQL之后,进入到mysql环境下,创建数据库,出现下面的提示信息: ERROR 1044 (42000): Access denied for user ''@'localh ...
- mysql ERROR 1044 (42000): Access denied for user ''@'localhost' to database
新安装的mysql密码是空的. ./mysql -u root -p use mysql SELECT `Host`,`User` FROM user; UPDATE user SET `Host` ...
- ERROR 1044 (42000): Access denied for user 'root'@'localhost' to database 'information_schema'
在我想把备份的数据库导入到本地数据的时候,发生这个错误,我使用的工具是dbForge Studio for MySQL ERROR 1044 (42000): Access denied for us ...
- ERROR 1044 (42000): Access denied for user ''@'localhost' to database 'mysql'
提示:ERROR 1044 (42000): Access denied for user ''@'localhost' to database 'mysql'.前两天也出现过这个问题,网上找了一个比 ...
- MySQL:ERROR 1044 (42000): Access denied for user ''@'localhost' to database 'mysql'
ERROR 1044 (42000): Access denied for user ''@'localhost' to database 'mysql'. 原因是:mysql数据库的user表里,存 ...
- 基于mysql创建库的报错解决小记mysql ERROR 1044 (42000): Access denied for user ''@'localhost' to database
mysql ERROR 1044 (42000): Access denied for user ''@'localhost' to database异常处理 1.找到find / -name my. ...
- ERROR 1044 (42000): Access denied for user 'root'@'localhost'
从供应商那边接手一个MySQL数据库(数据库版本为5.7.21 MySQL Community Server (GPL)),在创建账号时遇到了"ERROR 1044 (42000): Acc ...
随机推荐
- win7和centos双系统安装
几年之前为了安装xp和linux的双系统曾折腾了好多天,今天为了安装这个win7和centos双系统,也折腾了两天多,哦,我的天,安装个双系统,怎么这么麻烦呢? 没有来得及整理,先铺上草稿,供同志们参 ...
- 《Python基础教程(第二版)》学习笔记 -> 第九章 魔法方法、属性和迭代器
准备工作 >>> class NewStyle(object): more_code_here >>> class OldStyle: more_code_here ...
- Python多线程和Python的锁
Python多线程 Python中实现多线程有两种方式,一种基于_thread模块(在Python2.x版本中为thread模块,没有下划线)的start_new_thread()函数,另一种基于th ...
- XAMPP:访问phpmyadmin出错的解决方案
来源:http://www.ido321.com/1246.html XAMPP(Apache+MySQL+PHP+PERL)是一个功能强大的建 XAMPP 软件站集成软件包,轻巧,用起来很方便.它提 ...
- bzoj 3732 Network(最短路+倍增 | LCT)
[题目链接] http://www.lydsy.com/JudgeOnline/problem.php?id=3732 [题意] 给定一个无向图,处理若干询问:uv路径上最长的边最小是多少? [思路一 ...
- [Hive - LanguageManual] Select base use
Select Syntax WHERE Clause ALL and DISTINCT Clauses Partition Based Queries HAVING Clause LIMIT Clau ...
- SRM DIV1 500pt DP
SRM 501 DIV1 500pt SRM 502 DIV1 500pt SRM 508 DIV1 500pt SRM 509 DIV1 500pt SRM 511 DIV1 500pt SRM 5 ...
- 快速备份sqlserver2005以上版本数据库的方法-摘自网络
使用优化参数的备份命令 BACKUP DATABASE [test]TO DISK = N'D:\test_FULL_20110311_050001_1.bak',DISK = N'D:\test_F ...
- 利用管道实现Shell多进程
shell中有个&,表示该程序在后台执行,其实是fork了一个子进程,跟系统调用是一样的. 在实际的操作过程中,有时需要控制后台程序的个数,毕竟启动太多的后台,会对服务的性能造成影响. 所以需 ...
- CodeForces 489B BerSU Ball (贪心)
BerSU Ball 题目链接: http://acm.hust.edu.cn/vjudge/contest/121332#problem/E Description The Berland Stat ...