从另外一台服务器拷贝了个mysql实例过来,给root@'%'授权的时候提示ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES),以前5.6->5.7的时候,确实执行下mysql_upgrade一般就好了。但是拷贝的直接就是5.7,所以不是这个问题。

    执行show grants for root@127.0.0.1发现没有with grant option权限
于是执行use mysql;
update user set grant_priv = 'Y' where user='root' and host='127.0.0.1'
flush privileges;
 
再执行,有权限了。

'root'@'127.0.0.1'没有grant privileges的更多相关文章

  1. (28000): Access denied for user 'root'@'127.0.0.1' (using password: YES)

      在一台测试服务器测试Python脚本时,执行Python脚本时报如下错误: 主要错误信息为"operation the sql fail!1045 (28000): Access den ...

  2. could not insert: [com.trs.om.bean.UserLog] The user specified as a definer ('root'@'127.0.0.1') does not exist

    2019-07-01 11:24:09,315 [http-8080-24] org.hibernate.util.JDBCExceptionReporter logExceptionsWARN: S ...

  3. mysql开启skip-name-resolve 导致root@127.0.0.1(localhost)访问引发的ERROR 1045 (28000)错误解决方案

    为什么配置skip-name-resolve? 由于mysql -h${ip} 远程访问速度过慢, mysql -uroot -p123456 根据网友经验(https://www.cnblogs.c ...

  4. ERROR 1045 (28000): Access denied for user 'root'@'127.0.0.1' (using password: YES)

    我的原因是在配置文件my.ini [mysqld]项,在其后加入了一句:skip-name-resolve 导致授权出现这个错误,把skip-name-resolve这项屏蔽了就好了. 场景2:对所有 ...

  5. MySQL 1130 - Host 127.0.0.1 is not allowed to connect to this MySQL server

    在开发中为了让开发更方便,在本地配置环境,希望可以直接访问服务器上的MySQL数据库,更方便的管理数据库, 需要在本地远程连接linux服务器的本地数据库,直接用数据库管理工具连接出现如下报错1130 ...

  6. mysql -h localhost和mysql -h 127.0.0.1的区别

    今天早上同事说MySQL root账号登录不上了.我试了一下 #mysql -u root -p 提示”Access denied for user ‘root’@’localhost’ (using ...

  7. mysql部署后无法远程连接的原因(错误代码10061),服务监听127.0.0.1和0.0.0.0的区别

    在Ubuntu上部署mysql服务并添加了一个非root用户后,发现无法远程连接, Navicat连接mysql出现2003——can't connect to mysql server on loc ...

  8. linux下使用localhost和127.0.0.1都不能连接的解决思路

    linux下刚安装了mysql,尝试写了程序连接mysql,出现了只有用本地ip地址才能连接,而127.0.0.1和localhost都不能访问 解决这个问题主要查看3个方向 .hosts中是否有ip ...

  9. | unauthenticated user (1130, "Host '127.0.0.1' is not allowed to connect to this MySQL server")

    mysql> show processlist;+----+----------------------+-----------------+------+---------+------+-- ...

随机推荐

  1. python接口测试-充值

    import requests import json import unittest import HTMLTestRunner telphone =18200717087 #参数化手机号码 ur1 ...

  2. [LeetCode] 824. Goat Latin_Easy

    A sentence S is given, composed of words separated by spaces. Each word consists of lowercase and up ...

  3. Go linux 实践2

    今天,看看GO的高级语言特性-方法和接口 废话不多说,直接上代码 ************************************************* 1 package main 2 ...

  4. 查看Andorid应用是32位还是64位

    adb shell cat /proc/进程pid/maps 查看linker位数即可

  5. java基础(三) -基本数据类型

    变量就是申请内存来存储值.也就是说,当创建变量的时候,需要在内存中申请空间. 内存管理系统根据变量的类型为变量分配存储空间,分配的空间只能用来储存该类型数据. 因此,通过定义不同类型的变量,可以在内存 ...

  6. time_t time()

    time_t  atime,  btime; time(&atime); btime = time(0); 两种方式效果一样.

  7. jQuery-图片放大镜

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/ ...

  8. linux 中的screen出现cannot find terminfo entry 的错误

    事情的起因: 本地使用urxvt terminal ,使用ssh方式远程登录服务器,远程在服务器端执行screen命令,然后就出现了cannot find terminfo entry的错误. 解决方 ...

  9. [ Windows BAT Script ] BAT 脚本获取windows权限

    BAT 脚本获取windows权限 @echo off echo I am trying to run as Administrator %1 %2 ver|find "5."&g ...

  10. QT5中QByteArray转QString中文乱码

    1.添加头文件 #include <QTextCodec> 2.用QTextCodec 设置格式转换 QByteArray barr; barr.insert(0,(char*)(pMsg ...