问题:

在centOS上安装了mysql后,卸载了又重新安装,使用mysqladmin -u root password 'new password'

更改密码,提示: mysqladmin: Can't turn off logging; error: 'Access denied; you need the SUPER privilege for this operation'"

解决方案: 
1.修改MySQL的登录设置:
# vi /etc/my.cnf
在[mysqld]的段中加上一句:skip-grant-tables
例如:
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
skip-name-resolve
skip-grant-tables
保存并且退出vi。 
  
重新启动mysqld
# /etc/init.d/mysqld restart
Stopping MySQL: [ OK ]
Starting MySQL: [ OK ]

登录并修改MySQL的root密码
# /usr/bin/mysql
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 3 to server version: 3.23.56

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> USE mysql ;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
mysql> UPDATE user SET Password = password ( 'new-password' ) WHERE User = 'root' ;
Query OK, 0 rows affected (0.00 sec)
Rows matched: 2 Changed: 0 Warnings: 0

mysql> flush privileges ;
Query OK, 0 rows affected (0.01 sec)

mysql> quit

当root用户无密码,非超级权限用户时提示mysqladmin: Can't turn off logging; error: 'Access denied; you need the SUPER privilege for this op解决方案的更多相关文章

  1. MySQL, 创建一个只读用户和一个所有权限用户

    安装pasa需要配置mysql.基本知识学习一下 http://www.cnblogs.com/mr-wid/archive/2013/05/09/3068229.html MySQL 为关系型数据库 ...

  2. mysqladmin: connect to server at 'localhost' failed error: 'Access denied for user 'root'@'localhost' (using password: YES)'

    就当作自己忘记Mysql密码把,忘记密码的解决方法 一.mysql登录错误mysqladmin: connect to server at 'localhost' failederror: 'Acce ...

  3. Mac Mysql mysql_secure_installation Error: Access denied for user 'root'@'localhost' (using password: YES)

    mysql由brew安装, 期间好像自动更新了一次 然后再次执行mysql_secure_installation, 输入root密码后报错, 重装mysql还是不行 Error: Access de ...

  4. mysql链接 显示 error: 'Access denied for user 'root'@'localhost' (using password: NO)'

    解决方案 https://stackoverflow.com/questions/2995054/access-denied-for-user-rootlocalhost-using-password ...

  5. 用户管理 之 Linux 系统中的超级权限的控制

    在Linux操作系统中,root的权限是最高的,也被称为超级权限的拥有者.普通用户无法执行的操作,root用户都能完成,所以也被称之为超级管理用户. 在系统中,每个文件.目录和进程,都归属于某一个用户 ...

  6. MONGODB用户、角色和权限管理

      最近遇到很多问MONGODB用户认证授权方面的问题,现在特记录下来,与大家共享. 一.概念理解 1.用户概念 Mongodb的用户是由 用户名+所属库名组成 例如: 登录mongo  testdb ...

  7. mac 安装mysql + 修改root用户密码 + 及报Access denied for user 'root'@'localhost' (using password:YES)解决办法

    1.下载MySQL 到mysql的官网http://dev.mysql.com/downloads/mysql/然后在页面中会看到“MySQL Community Server”下方有一个“downl ...

  8. linux(centOS7)的基本操作(三) 用户、组、权限管理

    用户和组 1.用户.组.家目录的概念 linux系统支持多用户,除了管理员,其他用户一般不应该使用root,而是应该向管理员申请一个账号.组类似于角色,系统可以通过组对有共性的用户进行统一管理.每个用 ...

  9. [mysql]root用户登录mysql,输入密码后报错:Access denied for user 'root'@'localhost'

    问题如下: wangju-G4:~$ mysql -u root -p Enter password: ERROR (): Access denied for user 'root'@'localho ...

随机推荐

  1. 面试题思考:什么是基于注解的切面实现?(AOP是Aspect Oriented Program的首字母缩写)

    首先解释下AOP :在程序运行时,动态的将代码切入到类的指定方法.指定位置上的编程思想就是面向切面编程 一般而言,我们管切入到指定类指定方法的代码片段为切面,而切入的哪些类.哪些方法则叫切入点.有了A ...

  2. leveldb学习笔记

    LevelDB由 Jeff Dean和Sanjay Ghemawat开发. LevelDb是能够处理十亿级别规模Key-Value型数据持久性存储的C++ 程序库. 特别如下: 1.LevelDb是一 ...

  3. HDU 5892 Resident Evil

    题目链接:传送门 题目大意:有50种动物,给你n*n的矩阵,m次操作,P代表加入操作,在左上角 x1,y1 到右下角 x2,y2,的矩形范围内加入 种类为x,数量为y的动物. Q代表询问操作,在左上角 ...

  4. log4j中将SocketAppender将日志内容发送到远程服务器

    1.服务端配置 1)服务端配置文件log4j-server.properties #Define a narrow log category. A category like debug will p ...

  5. VMware虚拟机Host-Only(仅主机模式)

    转载于:https://www.linuxidc.com/Linux/2016-09/135521p3.htm 三.Host-Only(仅主机模式) Host-Only模式其实就是NAT模式去除了虚拟 ...

  6. 学习使用turtlebot2——安装ROS Indigo系统

    最近在学习使用turtlebot2,特此做一些学习记录. 安装ROS前要先决定自己电脑的Ubuntu(乌班图)系统.现在学习ROS常使用的Ubuntu系统有Ubuntu 16.04 和Ubuntu14 ...

  7. python之MySQL学习——输出指定条件的结果集

    # 引入pymysql模块 import pymysql as pm # 数据库连接 db = pm.connect(host=",database='task', charset='utf ...

  8. [刷题]ACM ICPC 2016北京赛站网络赛 D - Pick Your Players

    Description You are the manager of a small soccer team. After seeing the shameless behavior of your ...

  9. Storm-源码分析汇总

    Storm Features Storm 简介 Storm Topology的并发度 Storm - Guaranteeing message processing Storm - Transacti ...

  10. 利用python实现TCP和UDP服务器

    利用python的socket模块可以实现基本的网络编程,并且只限于一对一的连接.当然,也可以在其基础上实现一个网络服务器,但由于太底层这种做法不被推荐.其实如果要实现一个网络服务器很简单,调用pyt ...