document/current/cn/quick-start/index.xml (38 lines of code) (raw):
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>快速入门 on ShardingSphere</title>
<link>https://shardingsphere.apache.org/document/current/cn/quick-start/</link>
<description>Recent content in 快速入门 on ShardingSphere</description>
<generator>Hugo -- gohugo.io</generator>
<language>en-us</language><atom:link href="https://shardingsphere.apache.org/document/current/cn/quick-start/index.xml" rel="self" type="application/rss+xml" />
<item>
<title>ShardingSphere-JDBC</title>
<link>https://shardingsphere.apache.org/document/current/cn/quick-start/shardingsphere-jdbc-quick-start/</link>
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
<guid>https://shardingsphere.apache.org/document/current/cn/quick-start/shardingsphere-jdbc-quick-start/</guid>
<description>应用场景 Apache ShardingSphere-JDBC 可以通过 Java 和 YAML 这 2 种方式进行配置,开发者可根据场景选择适合的配置方式。
使用限制 目前仅支持 JAVA 语言
前提条件 开发环境需要具备 Java JRE 8 或更高版本。
操作步骤 规则配置。 详情请参见用户手册。
引入 maven 依赖。 &lt;dependency&gt; &lt;groupId&gt;org.apache.shardingsphere&lt;/groupId&gt; &lt;artifactId&gt;shardingsphere-jdbc&lt;/artifactId&gt; &lt;version&gt;${latest.release.version}&lt;/version&gt; &lt;/dependency&gt; 注意:请将 ${latest.release.version} 更改为实际的版本号。
创建 YAML 配置文件 # JDBC 逻辑库名称。在集群模式中,使用该参数来联通 ShardingSphere-JDBC 与 ShardingSphere-Proxy。 # 默认值:logic_db databaseName (?): mode: dataSources: rules: - !FOO_XXX ... - !BAR_XXX ... props: key_1: value_1 key_2: value_2 以 spring boot 为例,编辑 application.</description>
</item>
<item>
<title>ShardingSphere-Proxy</title>
<link>https://shardingsphere.apache.org/document/current/cn/quick-start/shardingsphere-proxy-quick-start/</link>
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
<guid>https://shardingsphere.apache.org/document/current/cn/quick-start/shardingsphere-proxy-quick-start/</guid>
<description>应用场景 ShardingSphere-Proxy 的定位为透明化的数据库代理,理论上支持任何使用 MySQL、PostgreSQL、openGauss 协议的客户端操作数据,对异构语言、运维场景更友好。
使用限制 ShardingSphere-Proxy 对系统库/表(如 information_schema、pg_catalog)支持有限,通过部分图形化数据库客户端连接 Proxy 时,可能客户端或 Proxy 会有错误提示。可以使用命令行客户端(mysql、psql、gsql 等)连接 Proxy 验证功能。
前提条件 使用 Docker 启动 ShardingSphere-Proxy 无须额外依赖。 使用二进制分发包启动 Proxy,需要环境具备 Java JRE 8 或更高版本。
操作步骤 获取 ShardingSphere-Proxy 目前 ShardingSphere-Proxy 可以通过以下方式:
二进制发布包 Docker Helm 规则配置 编辑 %SHARDINGSPHERE_PROXY_HOME%/conf/global.yaml。
编辑 %SHARDINGSPHERE_PROXY_HOME%/conf/database-xxx.yaml。
%SHARDINGSPHERE_PROXY_HOME% 为 Proxy 解压后的路径,例:/opt/shardingsphere-proxy-bin/
详情请参见 配置手册。
引入依赖 如果后端连接 PostgreSQL 或 openGauss 数据库,不需要引入额外依赖。
如果后端连接 MySQL 数据库,请下载 mysql-connector-java-5.1.49.jar 或者 mysql-connector-java-8.0.11.jar,并将其放入 %SHARDINGSPHERE_PROXY_HOME%/ext-lib 目录。</description>
</item>
</channel>
</rss>