首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >MaxScale:检索数据库名称失败

MaxScale:检索数据库名称失败
EN

Stack Overflow用户
提问于 2017-01-18 04:44:56
回答 2查看 443关注 0票数 0

当我启动maxscale时,我得到以下错误:

代码语言:javascript
复制
...
2017-01-17 20:26:05   debug  : qc_sqlite: Token 34 not handled explicitly.
2017-01-17 20:26:05   debug  : qc_sqlite: Token 103 not handled explicitly.
2017-01-17 20:26:05   debug  : qc_sqlite: Token 216 not handled explicitly.
2017-01-17 20:26:05   notice : Loaded module maxscaled: V2.0.0 from /usr/lib64/maxscale/libmaxscaled.so
2017-01-17 20:26:05   notice : Listening connections at /tmp/maxadmin.sock with protocol MaxScale Admin
2017-01-17 20:26:05   debug  : 140414757828672 [poll_add_dcb] Added dcb 0x1ad27f0 in state DCB_STATE_LISTENING to poll set.
2017-01-17 20:26:05   notice : Using encrypted passwords. Encryption key: '/var/lib/maxscale/.secrets'.
2017-01-17 20:26:05   error  : Failed to retrieve database names:
2017-01-17 20:26:05   error  : Shard Router: Unable to load database grant information, MaxScale authentication will proceed without including database permissions. See earlier error messages for user '*******' for more information.
2017-01-17 20:26:05   error  : Failed to retrieve database names:
2017-01-17 20:26:05   error  : Shard Router: Unable to load database grant information, MaxScale authentication will proceed without including database permissions. See earlier error messages for user '*******' for more information.

我启用了调试,但仍然看不到“早期”消息是什么!!我可以使用已配置的帐户连接到服务器,并且可以毫无问题地运行显示数据库。

数据库在RDS中。

有什么想法吗?

谢谢

EN

回答 2

Stack Overflow用户

发布于 2017-01-18 05:18:30

maxscale是否能够运行"show database“并不重要,它需要在运行时显式地授予show database权限:

代码语言:javascript
复制
SELECT * 
FROM   ( 
   ( 
          SELECT Count(1) AS ndbs 
          FROM   information_schema.schemata) AS tbl1, 
   ( 
          SELECT grantee, 
                 privilege_type 
          FROM   information_schema.user_privileges 
          WHERE  privilege_type='SHOW DATABASES' 
          AND    REPLACE(grantee, '\'','')=CURRENT_USER()) AS tbl2);

因此,如果不专门授予priv,查询将不会返回任何内容。

票数 0
EN

Stack Overflow用户

发布于 2017-03-17 22:24:48

MaxScale Tutorial中描述了MaxScale用户的授权要求。

maxuser@%用户所需的授权包括:

代码语言:javascript
复制
GRANT SELECT ON mysql.user TO 'maxuser'@'%';
GRANT SELECT ON mysql.db TO 'maxuser'@'%';
GRANT SELECT ON mysql.tables_priv TO 'maxuser'@'%';
GRANT SHOW DATABASES ON *.* TO 'maxuser'@'%';
GRANT REPLICATION CLIENT ON *.* TO 'maxuser'@'%';
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/41706647

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档