从另外一台服务器拷贝了个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. vuex中的dispatch和commit

    dispatch:含有异步操作,eg:向后台提交数据,写法: this.$store.dispatch('mutations方法名',值) commit:同步操作,写法:this.$store.com ...

  2. [LeetCode] 105. Construct Binary Tree from Preorder and Inorder Traversal_Medium tag: Tree Traversal

    Given preorder and inorder traversal of a tree, construct the binary tree. Note:You may assume that ...

  3. [LeetCode] 830. Positions of Large Groups_Easy tag: Two Pointers

    In a string S of lowercase letters, these letters form consecutive groups of the same character. For ...

  4. TL-WAR1200L V1.0升级软件20170609

         TL-WAR1200L_V1.0升级软件20170609.part1.rar  TL-WAR1200L_V1.0升级软件20170609.part2.rar TP-LINK WVR& ...

  5. 20165321实验一Java开发环境的熟悉-1

  6. (转载)cmd-命令大全及详解

    原文地址:http://greatverve.cnblogs.com/archive/2011/12/09/windows-cmd.html 命令简介 cmd是command的缩写.即命令行 . 虽然 ...

  7. UVA 11796 Dog Distance(几何)

    Dog Distance [题目链接]Dog Distance [题目类型]几何 &题解: 蓝书的题,刘汝佳的代码,学习一下 &代码: // UVa11796 Dog Distance ...

  8. jQuery-文本框事件应用-判断邮箱地址

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

  9. CentOS下Docker安装

    CentOS下Docker安装 1.安装: #sudo yum install docker 2.启动并加入开机启动: A.#sudo systemctl start docker B.#sudo s ...

  10. meta 跳转

    强无敌. 是否厌倦了页面枯燥的跳转? 试试这样的跳转吧. Duration:表示滤镜特效的持续时间(单位:秒) Transition:滤镜类型.表示使用哪种特效,取值为0-23. <Meta h ...