文章来源于网络收集而来,版权归原创者所有,如有侵权请及时联系!
数据源资源
定义
SHOW RESOURCES [FROM schemaName]
说明
列 | 说明 |
---|---|
name | 数据源名称 |
type | 数据源类型 |
host | 数据源地址 |
port | 数据源端口 |
db | 数据库名称 |
attribute | 数据源参数 |
示例
mysql> show resources;
+------+-------+-----------+------+------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| name | type | host | port | db | attribute |
+------+-------+-----------+------+------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| ds_0 | MySQL | 127.0.0.1 | 3306 | ds_0 | {"minPoolSize":1,"connectionTimeoutMilliseconds":30000,"maxLifetimeMilliseconds":1800000,"readOnly":false,"idleTimeoutMilliseconds":60000,"maxPoolSize":50} |
| ds_1 | MySQL | 127.0.0.1 | 3306 | ds_1 | {"minPoolSize":1,"connectionTimeoutMilliseconds":30000,"maxLifetimeMilliseconds":1800000,"readOnly":false,"idleTimeoutMilliseconds":60000,"maxPoolSize":50} |
+------+-------+-----------+------+------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
2 rows in set (0.84 sec)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
你是在哪儿执行这条语句?MySQL 里面???
为何没人回复,告诉我原因好不?
root@172.16.13.150 09:25: [by_db]>show resources;
ERROR 12000 (42000): You have an error in your SQL syntax: show resources, no viable alternative at input 'showresources' at line 1, position 5, near [@1,5:13='resources',<808>,1:5]
root@172.16.13.150 09:25: [by_db]>system pwd
/root/apache-shardingsphere-5.2.1-shardingsphere-proxy-bin
root@172.16.13.150 09:26: [by_db]>show tables;
+-----------------+------------+
| Tables_in_by_db | Table_type |
+-----------------+------------+
| sbtest10 | BASE TABLE |
| sbtest9 | BASE TABLE |
| sbtest2 | BASE TABLE |
| sbtest1 | BASE TABLE |
| sbtest4 | BASE TABLE |
| sbtest3 | BASE TABLE |
| sbtest6 | BASE TABLE |
| sbtest5 | BASE TABLE |
| sbtest8 | BASE TABLE |
| sbtest7 | BASE TABLE |
+-----------------+------------+
请问一下,我用的是5.2.1版本的sharding proxy 为何用这个命令show resources;报语法错误?