Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/ms-access/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Mysql MaxScale:检索数据库名称失败_Mysql_Maxscale - Fatal编程技术网

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

Mysql MaxScale:检索数据库名称失败,mysql,maxscale,Mysql,Maxscale,启动maxscale时,出现以下错误: ... 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.

启动maxscale时,出现以下错误:

...
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.
我启用了调试,但仍然看不到“早期”消息是什么!! 我可以使用配置的帐户连接到服务器,并且我可以在没有任何问题的情况下运行show databases

数据库在RDS中

有什么想法吗


感谢

maxscale能够运行“show databases”并不重要,它需要在运行时为show databases提供明确的授权:

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,查询将不会返回任何结果。

中描述了MaxScale用户的授予要求

maxuser@%
用户所需的授权为:

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'@'%';