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 ...
随机推荐
- JVM 性能调优实战之:使用阿里开源工具 TProfiler 在海量业务代码中精确定位性能代码
本文是<JVM 性能调优实战之:一次系统性能瓶颈的寻找过程> 的后续篇,该篇介绍了如何使用 JDK 自身提供的工具进行 JVM 调优将 TPS 由 2.5 提升到 20 (提升了 7 倍) ...
- Android UI开发详解之Fragment
Fragment是Android自从3.0之后新加入的一个组件,我相信很多人都已经听说过这个组件了,但这个组件到底是个什么,如何去使用他呢,且听我讲来. 以下部分资料来自官网(官网才是王道,其他都是浮 ...
- NumberSeekBar 可任意拖动和自动
package com.example.numberseekbar; import android.content.Context; import android.content.res.Resour ...
- 擦亮自己的眼睛去看SQLServer之简单Insert(转)
摘要:本来是打算先写SQLServer历史的,不过感觉写那部分内容比较难还需要多查些资料.于是调整了下顺序写下简单的Insert语句. 不过感觉写那部分内容比较难还需要多查些资料.于是调整了下顺序写下 ...
- Educational Codeforces Round 15 套题
这套题最后一题不会,然后先放一下,最后一题应该是大数据结构题 A:求连续最长严格递增的的串,O(n)简单dp #include <cstdio> #include <cstdlib& ...
- Selenium2Library系列 keywords 之 _SelectElementKeywords 之 list_should_have_no_selections(self, locator)
def list_should_have_no_selections(self, locator): """Verifies select list identified ...
- JQuery:各种操作表单元素方法小结
来源:http://www.ido321.com/1220.html 表单元素无处不在,已然成了Web应用不可或缺的一个部分.对表单最最最常见的操作就是获取表单元素的值或者更改表单元素的值.那在JQu ...
- 连分数(分数类模板) uva6875
//连分数(分数类模板) uva6875 // 题意:告诉你连分数的定义.求连分数,并逆向表示出来 // 思路:直接上分数类模板.要注意ai可以小于0 #include <iostream> ...
- leetcode—Swap Nodes in Pairs
1.题目描述 Given a linked list, swap every two adjacent nodes and return its head. For example, Given ...
- 【转】在企业内部分发 iOS 应用程序
(via:破船之家,原文:Provision iOS IPA App for In-House Enterprise Distribution) 在企业内部分发 iOS 应用程序非常复杂.经过努力 ...