1
工作,我已经以root身份登录并输入以下命令批命令不会在MySQL
GRANT ALL PRIVILEGES ON *.* TO 'hive'@'master' WITH GRANT OPTION;
结果是
Query OK, 0 rows affected, 1 warning (0.00 sec)
警告消息是
Warning | 1285 | MySQL is started in --skip-name-resolve mode; you must restart it without this switch for this grant to work
然后我检查用户配置单元的拨款
mysql> show grants for hive;
+-----------------------------------------------------------------------------------------------------+
| Grants for [email protected]% |
+-----------------------------------------------------------------------------------------------------+
| GRANT USAGE ON *.* TO 'hive'@'%' IDENTIFIED BY PASSWORD '*4DF1D66463C18D44E3B001A8FB1BBFBEA13E27FC' |
+-----------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)
,我试图
show grants for 'hive'@'master'
ERROR 1141 (42000): There is no such grant defined for user 'hive' on host 'master'
为什么在这里不授予命令?
我禁用了skip-name-resolv /etc/my.cnf
它工作。 http://mysql-forum.ch/archive/index.php?thread-5.html 我认为警告主要是由于使用主机名'主'而不是一个IP地址。
但是在/etc/my.cnf
中设置skip-name-resolv被禁用还是有其他选择吗?
看起来像它的工作。你收到了什么警告信息? – Rahul
警告说“MySQL以--skip-name-resolve模式启动;如果没有此开关,则必须重新启动才能使此授权生效” – April