blob: 8d8c7d27b8340c47adee831235107f0fa8718553 [file] [log] [blame]
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>YAML 配置 on ShardingSphere</title>
<link>https://shardingsphere.apache.org/document/current/cn/user-manual/shardingsphere-proxy/yaml-config/</link>
<description>Recent content in YAML 配置 on ShardingSphere</description>
<generator>Hugo -- gohugo.io</generator>
<language>en-us</language>
<atom:link href="https://shardingsphere.apache.org/document/current/cn/user-manual/shardingsphere-proxy/yaml-config/index.xml" rel="self" type="application/rss+xml" />
<item>
<title>权限</title>
<link>https://shardingsphere.apache.org/document/current/cn/user-manual/shardingsphere-proxy/yaml-config/authentication/</link>
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
<guid>https://shardingsphere.apache.org/document/current/cn/user-manual/shardingsphere-proxy/yaml-config/authentication/</guid>
<description>权限配置用于设置能够连接到 ShardingSphere-Proxy 的用户,并可以为他们授予不同的权限。
背景信息 在 ShardingSphere-Proxy 中,通过全局规则 Authority Rule (标识为 !AUTHORITY)来配置用户和授权信息。
得益于 ShardingSphere 的可插拔架构,Proxy 提供了两种级别的权限提供者,分别是:
ALL_PERMITTED:授予所有权限,不鉴权; DATABASE_PERMITTED:为用户授予指定逻辑库的权限,通过 user-database-mappings 进行映射。 在配置 Authority Rule 时,管理员可根据需要选择使用哪一种权限提供者。
参数解释 rules: - !AUTHORITY users: - # 用于登录计算节点的用户名,授权主机和密码的组合。格式:&amp;lt;username&amp;gt;@&amp;lt;hostname&amp;gt;:&amp;lt;password&amp;gt;,hostname 为 % 或空字符串表示不限制授权主机 provider: type: # 存储节点数据授权的权限提供者类型,缺省值为 ALL_PERMITTED 配置示例 ALL_PERMITTED rules: - !AUTHORITY users: - root@localhost:root - my_user@:pwd provider: type: ALL_PERMITTED 以上配置表示:
用户 root,仅可从 localhost 连接 Proxy,密码为 root; 用户 my_user,可以从任意主机连接 Proxy,密码为 pwd; provider 类型为 ALL_PERMITTED,表示对用户授予所有权限,不鉴权。 DATABASE_PERMITTED rules: - !</description>
</item>
<item>
<title>属性配置</title>
<link>https://shardingsphere.apache.org/document/current/cn/user-manual/shardingsphere-proxy/yaml-config/props/</link>
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
<guid>https://shardingsphere.apache.org/document/current/cn/user-manual/shardingsphere-proxy/yaml-config/props/</guid>
<description>背景信息 Apache ShardingSphere 提供属性配置的方式配置系统级配置。本节介绍 server.yaml 中的配置项。
参数解释 名称 数据类型 说明 默认值 动态生效 sql-show (?) boolean 是否在日志中打印 SQL。 打印 SQL 可以帮助开发者快速定位系统问题。日志内容包含:逻辑 SQL,真实 SQL 和 SQL 解析结果。
如果开启配置,日志将使用 Topic ShardingSphere-SQL,日志级别是 INFO。 false 是 sql-simple (?) boolean 是否在日志中打印简单风格的 SQL。 false 是 kernel-executor-size (?) int 用于设置任务处理线程池的大小。每个 ShardingSphereDataSource 使用一个独立的线程池,同一个 JVM 的不同数据源不共享线程池。 infinite 否 max-connections-size-per-query (?) int 一次查询请求在每个数据库实例中所能使用的最大连接数。 1 是 check-table-metadata-enabled (?</description>
</item>
<item>
<title>规则配置</title>
<link>https://shardingsphere.apache.org/document/current/cn/user-manual/shardingsphere-proxy/yaml-config/rules/</link>
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
<guid>https://shardingsphere.apache.org/document/current/cn/user-manual/shardingsphere-proxy/yaml-config/rules/</guid>
<description>背景信息 本节介绍如何进行 ShardingSphere-Proxy 的规则配置。
参数解释 ShardingSphere-Proxy 的规则配置与 ShardingSphere-JDBC 一致,具体规则请参考 ShardingSphere-JDBC 规则配置。
注意事项 与 ShardingSphere-JDBC 不同的是,以下规则需要配置在 ShardingSphere-Proxy 的 server.yaml 中:
SQL 解析 分布式事务 SQL 翻译 </description>
</item>
</channel>
</rss>