• 欢迎访问搞代码网站,推荐使用最新版火狐浏览器和Chrome浏览器访问本网站!
  • 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏搞代码吧

mysql root 用户不能受权

mysql 搞代码 7年前 (2018-06-05) 150次浏览 已收录 0个评论

mysql root 用户不能授权
D:/MySQL Server 5.1_3307/bin>mysql -uroot -p -P3307
Enter password: **********
Welcome to the MySQL monitor. Commands end with ; or /g.
Your MySQL connection id is 4
Server version: 5.1.48-community-log MySQL Community Server (GPL)

Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
This software comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to modify and redistribute it under the GPL v2 license

Type ‘help;’ or ‘/h’ for help. Type ‘/c’ to clear the current input statement.

mysql> show grants for root@localhost;
+——————————————-
———————+
| Grants for root@localhost
  |
+——————————————-
———————+
| GRANT ALL PRIVILEGES ON *.* TO ‘root’@’localhost’ IDENTIFIED BY PASSWORD ‘*53A
2CDC5421A3735BF8AD4DCB66F493BE2B4EF78′ WITH GRANT OPTION |
+——————————————-
———————+
1 row in set (0.00 sec)

mysql> create database test1;
Query OK, 1 row affected (0.00 sec)

mysql> grant all on *.* to game@’%’ identified by ‘123456’;
ERROR 1045 (28000): Access denied for user ‘root’@’%’ (using password: YES)
mysql>

以上为操作记录 我用root进入数据库,什么权限都有,但是在授权给别的用户的时候报错,谁碰到过这种问题,求高手解答,

——解决方案——————–
root@%的权限是不是all privileges,而是单个组合起来的,所以也就不能给别人赋all的权限
——解决方案——————–

引用

ERROR 1045 (28000): Access denied for user ‘root’@’%’ (using password: YES)


搞代码网(gaodaima.com)提供的所有资源部分来自互联网,如果有侵犯您的版权或其他权益,请说明详细缘由并提供版权或权益证明然后发送到邮箱[email protected],我们会在看到邮件的第一时间内为您处理,或直接联系QQ:872152909。本网站采用BY-NC-SA协议进行授权
转载请注明原文链接:mysql root 用户不能受权

喜欢 (0)
[搞代码]
分享 (0)
发表我的评论
取消评论

表情 贴图 加粗 删除线 居中 斜体 签到

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址