This is an automated email from the ASF dual-hosted git repository.
jin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-hugegraph-doc.git
The following commit(s) were added to refs/heads/master by this push:
new 08231df7 fix: update mysql backend and multi graphs (#270)
08231df7 is described below
commit 08231df7aa4f047df2c3bb1424e8e963070f80e9
Author: Liu Xiao <[email protected]>
AuthorDate: Tue Jun 13 13:56:46 2023 +0800
fix: update mysql backend and multi graphs (#270)
---
content/cn/docs/config/config-guide.md | 93 ++++++++++++++++++++------
content/cn/docs/quickstart/hugegraph-server.md | 71 +++++++++++++++-----
content/en/docs/config/config-guide.md | 93 ++++++++++++++++++++------
content/en/docs/quickstart/hugegraph-server.md | 71 +++++++++++++++-----
4 files changed, 254 insertions(+), 74 deletions(-)
diff --git a/content/cn/docs/config/config-guide.md
b/content/cn/docs/config/config-guide.md
index 317ffab6..b6afa0d6 100644
--- a/content/cn/docs/config/config-guide.md
+++ b/content/cn/docs/config/config-guide.md
@@ -259,46 +259,97 @@ cassandra.password=
### 5 多图配置
-我们的系统是可以存在多个图的,并且各个图的后端可以不一样,比如图 hugegraph 和 hugegraph1,其中 hugegraph 以
cassandra 作为后端,hugegraph1 以 rocksdb作为后端。
+我们的系统是可以存在多个图的,并且各个图的后端可以不一样,比如图 `hugegraph_rocksdb` 和 `hugegraph_mysql`,其中
`hugegraph_rocksdb` 以 `RocksDB` 作为后端,`hugegraph_mysql` 以 `MySQL` 作为后端。
配置方法也很简单:
-**修改 gremlin-server.yaml**
+**[可选]:修改 rest-server.properties**
-在 gremlin-server.yaml 的 graphs 域中添加一个键值对,键为图的名字,值为图的配置文件路径,比如:
+通过修改 `rest-server.properties` 中的 `graphs` 配置项来设置图的配置文件目录。默认配置为
`graphs=./conf/graphs`,如果想要修改为其它目录则调整 `graphs` 配置项,比如调整为
`graphs=/etc/hugegraph/graphs`,示例如下:
-```yaml
-graphs: {
- hugegraph: conf/hugegraph.properties,
- hugegraph1: conf/hugegraph1.properties
-}
+```properties
+graphs=./conf/graphs
```
-**修改 rest-server.properties**
+在 `conf/graphs` 路径下基于 `hugegraph.properties` 修改得到
`hugegraph_mysql_backend.properties` 和 `hugegraph_rocksdb_backend.properties`
-在 rest-server.properties 的 graphs 域中添加一个键值对,键为图的名字,值为图的配置文件路径,比如:
+`hugegraph_mysql_backend.properties` 修改的部分如下:
```properties
-graphs=[hugegraph:conf/hugegraph.properties,
hugegraph1:conf/hugegraph1.properties]
-```
+backend=mysql
+serializer=mysql
-**添加 hugegraph1.properties**
+store=hugegraph_mysql
-拷贝 hugegraph.properties,命名为 hugegraph1.properties,修改图对应的数据库名以及关于后端部分的参数,比如:
-
-```properties
-store=hugegraph1
+# mysql backend config
+jdbc.driver=com.mysql.cj.jdbc.Driver
+jdbc.url=jdbc:mysql://127.0.0.1:3306
+jdbc.username=root
+jdbc.password=123456
+jdbc.reconnect_max_times=3
+jdbc.reconnect_interval=3
+jdbc.ssl_mode=false
+```
-...
+`hugegraph_rocksdb_backend.properties` 修改的部分如下:
+```properties
backend=rocksdb
serializer=binary
+
+store=hugegraph_rocksdb
```
**停止 Server,初始化执行 init-store.sh(为新的图创建数据库),重新启动 Server**
```bash
-$ bin/stop-hugegraph.sh
-$ bin/init-store.sh
-$ bin/start-hugegraph.sh
+$ ./bin/stop-hugegraph.sh
+```
+
+```bash
+$ ./bin/init-store.sh
+
+Initializing HugeGraph Store...
+2023-06-11 14:16:14 [main] [INFO] o.a.h.u.ConfigUtil - Scanning option
'graphs' directory './conf/graphs'
+2023-06-11 14:16:14 [main] [INFO] o.a.h.c.InitStore - Init graph with config
file: ./conf/graphs/hugegraph_rocksdb_backend.properties
+...
+2023-06-11 14:16:15 [main] [INFO] o.a.h.StandardHugeGraph - Graph
'hugegraph_rocksdb' has been initialized
+2023-06-11 14:16:15 [main] [INFO] o.a.h.c.InitStore - Init graph with config
file: ./conf/graphs/hugegraph_mysql_backend.properties
+...
+2023-06-11 14:16:16 [main] [INFO] o.a.h.StandardHugeGraph - Graph
'hugegraph_mysql' has been initialized
+2023-06-11 14:16:16 [main] [INFO] o.a.h.StandardHugeGraph - Close graph
standardhugegraph[hugegraph_rocksdb]
+...
+2023-06-11 14:16:16 [main] [INFO] o.a.h.HugeFactory - HugeFactory shutdown
+2023-06-11 14:16:16 [hugegraph-shutdown] [INFO] o.a.h.HugeFactory - HugeGraph
is shutting down
+Initialization finished.
+```
+
+```bash
+$ ./bin/start-hugegraph.sh
+
+Starting HugeGraphServer...
+Connecting to HugeGraphServer (http://127.0.0.1:18080/graphs)...OK
+Started [pid 21614]
+```
+
+查看创建的图:
+
+```bash
+curl http://127.0.0.1:8080/graphs/
+
+{"graphs":["hugegraph_rocksdb","hugegraph_mysql"]}
```
+
+查看某个图的信息:
+
+```bash
+curl http://127.0.0.1:8080/graphs/hugegraph_mysql_backend
+
+{"name":"hugegraph_mysql","backend":"mysql"}
+```
+
+```bash
+curl http://127.0.0.1:8080/graphs/hugegraph_rocksdb_backend
+
+{"name":"hugegraph_rocksdb","backend":"rocksdb"}
+```
\ No newline at end of file
diff --git a/content/cn/docs/quickstart/hugegraph-server.md
b/content/cn/docs/quickstart/hugegraph-server.md
index aeabb597..71d48383 100644
--- a/content/cn/docs/quickstart/hugegraph-server.md
+++ b/content/cn/docs/quickstart/hugegraph-server.md
@@ -212,22 +212,22 @@ cassandra.password=
cd hugegraph-${version}
bin/init-store.sh
Initing HugeGraph Store...
-2017-12-01 11:26:51 1424 [main] [INFO ] com.baidu.hugegraph.HugeGraph [] -
Opening backend store: 'cassandra'
-2017-12-01 11:26:52 2389 [main] [INFO ]
com.baidu.hugegraph.backend.store.cassandra.CassandraStore [] - Failed to
connect keyspace: hugegraph, try init keyspace later
-2017-12-01 11:26:52 2472 [main] [INFO ]
com.baidu.hugegraph.backend.store.cassandra.CassandraStore [] - Failed to
connect keyspace: hugegraph, try init keyspace later
-2017-12-01 11:26:52 2557 [main] [INFO ]
com.baidu.hugegraph.backend.store.cassandra.CassandraStore [] - Failed to
connect keyspace: hugegraph, try init keyspace later
-2017-12-01 11:26:53 2797 [main] [INFO ]
com.baidu.hugegraph.backend.store.cassandra.CassandraStore [] - Store
initialized: huge_graph
-2017-12-01 11:26:53 2945 [main] [INFO ]
com.baidu.hugegraph.backend.store.cassandra.CassandraStore [] - Store
initialized: huge_schema
-2017-12-01 11:26:53 3044 [main] [INFO ]
com.baidu.hugegraph.backend.store.cassandra.CassandraStore [] - Store
initialized: huge_index
-2017-12-01 11:26:53 3046 [pool-3-thread-1] [INFO ]
com.baidu.hugegraph.backend.Transaction [] - Clear cache on event 'store.init'
-2017-12-01 11:26:59 9720 [main] [INFO ] com.baidu.hugegraph.HugeGraph [] -
Opening backend store: 'cassandra'
-2017-12-01 11:27:00 9805 [main] [INFO ]
com.baidu.hugegraph.backend.store.cassandra.CassandraStore [] - Failed to
connect keyspace: hugegraph1, try init keyspace later
-2017-12-01 11:27:00 9886 [main] [INFO ]
com.baidu.hugegraph.backend.store.cassandra.CassandraStore [] - Failed to
connect keyspace: hugegraph1, try init keyspace later
-2017-12-01 11:27:00 9955 [main] [INFO ]
com.baidu.hugegraph.backend.store.cassandra.CassandraStore [] - Failed to
connect keyspace: hugegraph1, try init keyspace later
-2017-12-01 11:27:00 10175 [main] [INFO ]
com.baidu.hugegraph.backend.store.cassandra.CassandraStore [] - Store
initialized: huge_graph
-2017-12-01 11:27:00 10321 [main] [INFO ]
com.baidu.hugegraph.backend.store.cassandra.CassandraStore [] - Store
initialized: huge_schema
-2017-12-01 11:27:00 10413 [main] [INFO ]
com.baidu.hugegraph.backend.store.cassandra.CassandraStore [] - Store
initialized: huge_index
-2017-12-01 11:27:00 10413 [pool-3-thread-1] [INFO ]
com.baidu.hugegraph.backend.Transaction [] - Clear cache on event 'store.init'
+2017-12-01 11:26:51 1424 [main] [INFO ] org.apache.hugegraph.HugeGraph [] -
Opening backend store: 'cassandra'
+2017-12-01 11:26:52 2389 [main] [INFO ]
org.apache.hugegraph.backend.store.cassandra.CassandraStore [] - Failed to
connect keyspace: hugegraph, try init keyspace later
+2017-12-01 11:26:52 2472 [main] [INFO ]
org.apache.hugegraph.backend.store.cassandra.CassandraStore [] - Failed to
connect keyspace: hugegraph, try init keyspace later
+2017-12-01 11:26:52 2557 [main] [INFO ]
org.apache.hugegraph.backend.store.cassandra.CassandraStore [] - Failed to
connect keyspace: hugegraph, try init keyspace later
+2017-12-01 11:26:53 2797 [main] [INFO ]
org.apache.hugegraph.backend.store.cassandra.CassandraStore [] - Store
initialized: huge_graph
+2017-12-01 11:26:53 2945 [main] [INFO ]
org.apache.hugegraph.backend.store.cassandra.CassandraStore [] - Store
initialized: huge_schema
+2017-12-01 11:26:53 3044 [main] [INFO ]
org.apache.hugegraph.backend.store.cassandra.CassandraStore [] - Store
initialized: huge_index
+2017-12-01 11:26:53 3046 [pool-3-thread-1] [INFO ]
org.apache.hugegraph.backend.Transaction [] - Clear cache on event 'store.init'
+2017-12-01 11:26:59 9720 [main] [INFO ] org.apache.hugegraph.HugeGraph [] -
Opening backend store: 'cassandra'
+2017-12-01 11:27:00 9805 [main] [INFO ]
org.apache.hugegraph.backend.store.cassandra.CassandraStore [] - Failed to
connect keyspace: hugegraph1, try init keyspace later
+2017-12-01 11:27:00 9886 [main] [INFO ]
org.apache.hugegraph.backend.store.cassandra.CassandraStore [] - Failed to
connect keyspace: hugegraph1, try init keyspace later
+2017-12-01 11:27:00 9955 [main] [INFO ]
org.apache.hugegraph.backend.store.cassandra.CassandraStore [] - Failed to
connect keyspace: hugegraph1, try init keyspace later
+2017-12-01 11:27:00 10175 [main] [INFO ]
org.apache.hugegraph.backend.store.cassandra.CassandraStore [] - Store
initialized: huge_graph
+2017-12-01 11:27:00 10321 [main] [INFO ]
org.apache.hugegraph.backend.store.cassandra.CassandraStore [] - Store
initialized: huge_schema
+2017-12-01 11:27:00 10413 [main] [INFO ]
org.apache.hugegraph.backend.store.cassandra.CassandraStore [] - Store
initialized: huge_index
+2017-12-01 11:27:00 10413 [pool-3-thread-1] [INFO ]
org.apache.hugegraph.backend.Transaction [] - Clear cache on event 'store.init'
```
启动 server
@@ -314,6 +314,45 @@ Connecting to HugeGraphServer
(http://127.0.0.1:8080/graphs)....OK
> 更多其它后端配置可参考[配置项介绍](/docs/config/config-option)
+#### 5.6 MySQL
+
+> 由于 MySQL 是在 GPL 协议下,与 Apache 协议不兼容,用户需自行安装
MySQL,[下载地址](https://dev.mysql.com/downloads/mysql/)
+
+下载 MySQL 的[驱动包](https://repo1.maven.org/maven2/mysql/mysql-connector-java/),比如
`mysql-connector-java-8.0.30.jar`,并放入 HugeGraph-Server 的 `lib` 目录下。
+
+修改 `hugegraph.properties`,配置数据库URL,用户名和密码,`store` 是数据库名,如果没有会被自动创建。
+
+```properties
+backend=mysql
+serializer=mysql
+
+store=hugegraph
+
+# mysql backend config
+jdbc.driver=com.mysql.cj.jdbc.Driver
+jdbc.url=jdbc:mysql://127.0.0.1:3306
+jdbc.username=
+jdbc.password=
+jdbc.reconnect_max_times=3
+jdbc.reconnect_interval=3
+jdbc.ssl_mode=false
+```
+
+初始化数据库(仅第一次启动时需要)
+
+```bash
+cd hugegraph-${version}
+bin/init-store.sh
+```
+
+启动server
+
+```bash
+bin/start-hugegraph.sh
+Starting HugeGraphServer...
+Connecting to HugeGraphServer (http://127.0.0.1:8080/graphs)....OK
+```
+
### 6 访问 Server
#### 6.1 服务启动状态校验
diff --git a/content/en/docs/config/config-guide.md
b/content/en/docs/config/config-guide.md
index df9fc544..763711d5 100644
--- a/content/en/docs/config/config-guide.md
+++ b/content/en/docs/config/config-guide.md
@@ -257,46 +257,97 @@ Pay attention to the following uncommented items:
### 5. Multi-Graph Configuration
-Our system can have multiple graphs, and each graph can have a different
backend. For example, there are two graphs named `hugegraph` and `hugegraph1`,
where `hugegraph` uses Cassandra as the backend and `hugegraph1` uses RocksDB
as the backend.
+Our system can have multiple graphs, and the backend of each graph can be
different, such as `hugegraph_rocksdb` and `hugegraph_mysql`, where
`hugegraph_rocksdb` uses `RocksDB` as the backend, and `hugegraph_mysql` uses
`MySQL` as a backend.
The configuration method is simple:
-**Modify `gremlin-server.yaml`**
+**[Optional]: Modify `rest-server.properties`**
-Add a key-value pair in the `graphs` section of `gremlin-server.yaml`, where
the key is the name of the graph and the value is the path to the graph's
configuration file. For example:
+You can modify the graph profile directory in the `graphs` field of
`rest-server.properties`. The default configuration is `graphs=./conf/graphs`,
if you want to change it to another directory then adjust the `graphs` field,
e.g. adjust it to `graphs=/etc/hugegraph/graphs`, example is as follows:
-```yaml
-graphs: {
- hugegraph: conf/hugegraph.properties,
- hugegraph1: conf/hugegraph1.properties
-}
+```properties
+graphs=./conf/graphs
```
-**Modify `rest-server.properties`**
+Modify `hugegraph_mysql_backend.properties` and
`hugegraph_rocksdb_backend.properties` based on `hugegraph.properties` under
`conf/graphs` path
-Add a key-value pair in the `graphs` section of `rest-server.properties`,
where the key is the name of the graph and the value is the path to the graph's
configuration file. For example:
+The modified part of `hugegraph_mysql_backend.properties` is as follows:
```properties
-graphs=[hugegraph:conf/hugegraph.properties,
hugegraph1:conf/hugegraph1.properties]
-```
+backend=mysql
+serializer=mysql
-**Add `hugegraph1.properties`**
+store=hugegraph_mysql
-Copy `hugegraph.properties` and name it `hugegraph1.properties`. Modify the
database name corresponding to the graph and the parameters related to the
backend. For example:
-
-```properties
-store=hugegraph1
+# mysql backend config
+jdbc.driver=com.mysql.cj.jdbc.Driver
+jdbc.url=jdbc:mysql://127.0.0.1:3306
+jdbc.username=root
+jdbc.password=123456
+jdbc.reconnect_max_times=3
+jdbc.reconnect_interval=3
+jdbc.ssl_mode=false
+```
-...
+The modified part of `hugegraph_rocksdb_backend.properties` is as follows:
+```properties
backend=rocksdb
serializer=binary
+
+store=hugegraph_rocksdb
```
**Stop the server, execute `init-store.sh` (to create a new database for the
new graph), and restart the server.**
```bash
-$ bin/stop-hugegraph.sh
-$ bin/init-store.sh
-$ bin/start-hugegraph.sh
+$ ./bin/stop-hugegraph.sh
+```
+
+```bash
+$ ./bin/init-store.sh
+
+Initializing HugeGraph Store...
+2023-06-11 14:16:14 [main] [INFO] o.a.h.u.ConfigUtil - Scanning option
'graphs' directory './conf/graphs'
+2023-06-11 14:16:14 [main] [INFO] o.a.h.c.InitStore - Init graph with config
file: ./conf/graphs/hugegraph_rocksdb_backend.properties
+...
+2023-06-11 14:16:15 [main] [INFO] o.a.h.StandardHugeGraph - Graph
'hugegraph_rocksdb' has been initialized
+2023-06-11 14:16:15 [main] [INFO] o.a.h.c.InitStore - Init graph with config
file: ./conf/graphs/hugegraph_mysql_backend.properties
+...
+2023-06-11 14:16:16 [main] [INFO] o.a.h.StandardHugeGraph - Graph
'hugegraph_mysql' has been initialized
+2023-06-11 14:16:16 [main] [INFO] o.a.h.StandardHugeGraph - Close graph
standardhugegraph[hugegraph_rocksdb]
+...
+2023-06-11 14:16:16 [main] [INFO] o.a.h.HugeFactory - HugeFactory shutdown
+2023-06-11 14:16:16 [hugegraph-shutdown] [INFO] o.a.h.HugeFactory - HugeGraph
is shutting down
+Initialization finished.
+```
+
+```bash
+$ ./bin/start-hugegraph.sh
+
+Starting HugeGraphServer...
+Connecting to HugeGraphServer (http://127.0.0.1:18080/graphs)...OK
+Started [pid 21614]
+```
+
+Check out created graphs:
+
+```bash
+curl http://127.0.0.1:8080/graphs/
+
+{"graphs":["hugegraph_rocksdb","hugegraph_mysql"]}
```
+
+Get details of the graph
+
+```bash
+curl http://127.0.0.1:8080/graphs/hugegraph_mysql_backend
+
+{"name":"hugegraph_mysql","backend":"mysql"}
+```
+
+```bash
+curl http://127.0.0.1:8080/graphs/hugegraph_rocksdb_backend
+
+{"name":"hugegraph_rocksdb","backend":"rocksdb"}
+```
\ No newline at end of file
diff --git a/content/en/docs/quickstart/hugegraph-server.md
b/content/en/docs/quickstart/hugegraph-server.md
index 99de490f..0969a1df 100644
--- a/content/en/docs/quickstart/hugegraph-server.md
+++ b/content/en/docs/quickstart/hugegraph-server.md
@@ -223,22 +223,22 @@ Initialize the database (required only on first startup)
cd hugegraph-${version}
bin/init-store.sh
Initing HugeGraph Store...
-2017-12-01 11:26:51 1424 [main] [INFO ] com.baidu.hugegraph.HugeGraph [] -
Opening backend store: 'cassandra'
-2017-12-01 11:26:52 2389 [main] [INFO ]
com.baidu.hugegraph.backend.store.cassandra.CassandraStore [] - Failed to
connect keyspace: hugegraph, try init keyspace later
-2017-12-01 11:26:52 2472 [main] [INFO ]
com.baidu.hugegraph.backend.store.cassandra.CassandraStore [] - Failed to
connect keyspace: hugegraph, try init keyspace later
-2017-12-01 11:26:52 2557 [main] [INFO ]
com.baidu.hugegraph.backend.store.cassandra.CassandraStore [] - Failed to
connect keyspace: hugegraph, try init keyspace later
-2017-12-01 11:26:53 2797 [main] [INFO ]
com.baidu.hugegraph.backend.store.cassandra.CassandraStore [] - Store
initialized: huge_graph
-2017-12-01 11:26:53 2945 [main] [INFO ]
com.baidu.hugegraph.backend.store.cassandra.CassandraStore [] - Store
initialized: huge_schema
-2017-12-01 11:26:53 3044 [main] [INFO ]
com.baidu.hugegraph.backend.store.cassandra.CassandraStore [] - Store
initialized: huge_index
-2017-12-01 11:26:53 3046 [pool-3-thread-1] [INFO ]
com.baidu.hugegraph.backend.Transaction [] - Clear cache on event 'store.init'
-2017-12-01 11:26:59 9720 [main] [INFO ] com.baidu.hugegraph.HugeGraph [] -
Opening backend store: 'cassandra'
-2017-12-01 11:27:00 9805 [main] [INFO ]
com.baidu.hugegraph.backend.store.cassandra.CassandraStore [] - Failed to
connect keyspace: hugegraph1, try init keyspace later
-2017-12-01 11:27:00 9886 [main] [INFO ]
com.baidu.hugegraph.backend.store.cassandra.CassandraStore [] - Failed to
connect keyspace: hugegraph1, try init keyspace later
-2017-12-01 11:27:00 9955 [main] [INFO ]
com.baidu.hugegraph.backend.store.cassandra.CassandraStore [] - Failed to
connect keyspace: hugegraph1, try init keyspace later
-2017-12-01 11:27:00 10175 [main] [INFO ]
com.baidu.hugegraph.backend.store.cassandra.CassandraStore [] - Store
initialized: huge_graph
-2017-12-01 11:27:00 10321 [main] [INFO ]
com.baidu.hugegraph.backend.store.cassandra.CassandraStore [] - Store
initialized: huge_schema
-2017-12-01 11:27:00 10413 [main] [INFO ]
com.baidu.hugegraph.backend.store.cassandra.CassandraStore [] - Store
initialized: huge_index
-2017-12-01 11:27:00 10413 [pool-3-thread-1] [INFO ]
com.baidu.hugegraph.backend.Transaction [] - Clear cache on event 'store.init'
+2017-12-01 11:26:51 1424 [main] [INFO ] org.apache.hugegraph.HugeGraph [] -
Opening backend store: 'cassandra'
+2017-12-01 11:26:52 2389 [main] [INFO ]
org.apache.hugegraph.backend.store.cassandra.CassandraStore [] - Failed to
connect keyspace: hugegraph, try init keyspace later
+2017-12-01 11:26:52 2472 [main] [INFO ]
org.apache.hugegraph.backend.store.cassandra.CassandraStore [] - Failed to
connect keyspace: hugegraph, try init keyspace later
+2017-12-01 11:26:52 2557 [main] [INFO ]
org.apache.hugegraph.backend.store.cassandra.CassandraStore [] - Failed to
connect keyspace: hugegraph, try init keyspace later
+2017-12-01 11:26:53 2797 [main] [INFO ]
org.apache.hugegraph.backend.store.cassandra.CassandraStore [] - Store
initialized: huge_graph
+2017-12-01 11:26:53 2945 [main] [INFO ]
org.apache.hugegraph.backend.store.cassandra.CassandraStore [] - Store
initialized: huge_schema
+2017-12-01 11:26:53 3044 [main] [INFO ]
org.apache.hugegraph.backend.store.cassandra.CassandraStore [] - Store
initialized: huge_index
+2017-12-01 11:26:53 3046 [pool-3-thread-1] [INFO ]
org.apache.hugegraph.backend.Transaction [] - Clear cache on event 'store.init'
+2017-12-01 11:26:59 9720 [main] [INFO ] org.apache.hugegraph.HugeGraph [] -
Opening backend store: 'cassandra'
+2017-12-01 11:27:00 9805 [main] [INFO ]
org.apache.hugegraph.backend.store.cassandra.CassandraStore [] - Failed to
connect keyspace: hugegraph1, try init keyspace later
+2017-12-01 11:27:00 9886 [main] [INFO ]
org.apache.hugegraph.backend.store.cassandra.CassandraStore [] - Failed to
connect keyspace: hugegraph1, try init keyspace later
+2017-12-01 11:27:00 9955 [main] [INFO ]
org.apache.hugegraph.backend.store.cassandra.CassandraStore [] - Failed to
connect keyspace: hugegraph1, try init keyspace later
+2017-12-01 11:27:00 10175 [main] [INFO ]
org.apache.hugegraph.backend.store.cassandra.CassandraStore [] - Store
initialized: huge_graph
+2017-12-01 11:27:00 10321 [main] [INFO ]
org.apache.hugegraph.backend.store.cassandra.CassandraStore [] - Store
initialized: huge_schema
+2017-12-01 11:27:00 10413 [main] [INFO ]
org.apache.hugegraph.backend.store.cassandra.CassandraStore [] - Store
initialized: huge_index
+2017-12-01 11:27:00 10413 [pool-3-thread-1] [INFO ]
org.apache.hugegraph.backend.Transaction [] - Clear cache on event 'store.init'
```
Start server
@@ -325,6 +325,45 @@ Connecting to HugeGraphServer
(http://127.0.0.1:8080/graphs)....OK
> for more other backend configurations, please refer to[introduction to
> configuration items](/docs/config/config-option)
+#### 5.6 MySQL
+
+> Due to MySQL is under GPL license, which is not compatible with Apache
License indeed, Users need to install MySQL, [Download
Link](https://dev.mysql.com/downloads/mysql/)
+
+Download MySQL's [driver package]
(https://repo1.maven.org/maven2/mysql/mysql-connector-java/), such as
`mysql-connector-java-8.0.30.jar`, and put it into HugeGraph- Server's `lib`
directory.
+
+Modify `hugegraph.properties`, configure the database URL, username and
password, `store` is the database name, if not, it will be created
automatically.
+
+```properties
+backend=mysql
+serializer=mysql
+
+store=hugegraph
+
+# mysql backend config
+jdbc.driver=com.mysql.cj.jdbc.Driver
+jdbc.url=jdbc:mysql://127.0.0.1:3306
+jdbc.username=
+jdbc.password=
+jdbc.reconnect_max_times=3
+jdbc.reconnect_interval=3
+jdbc.ssl_mode=false
+```
+
+Initialize the database (required only on first startup)
+
+```bash
+cd hugegraph-${version}
+bin/init-store.sh
+```
+
+Start server
+
+```bash
+bin/start-hugegraph.sh
+Starting HugeGraphServer...
+Connecting to HugeGraphServer (http://127.0.0.1:8080/graphs)....OK
+```
+
### 6 Access server
#### 6.1 Service startup status check