dosubot[bot] commented on issue #2554: URL: https://github.com/apache/incubator-hugegraph/issues/2554#issuecomment-2200158706
<!-- Answer --> 是的,两张图可以使用同一个 MySQL 后端的配置。你只需要在每个图的配置文件中指定不同的 `store` 名称即可。例如: `graph1.properties`: ```properties backend=mysql serializer=mysql store=hugegraph_01 jdbc.driver=com.mysql.cj.jdbc.Driver jdbc.url=jdbc:mysql://210.45.xxx.xx:3306 jdbc.username=xx jdbc.password=xxxx jdbc.reconnect_max_times=3 jdbc.reconnect_interval=3 jdbc.ssl_mode=false ``` `graph2.properties`: ```properties backend=mysql serializer=mysql store=hugegraph_02 jdbc.driver=com.mysql.cj.jdbc.Driver jdbc.url=jdbc:mysql://210.45.xxx.xx:3306 jdbc.username=xx jdbc.password=xxxx jdbc.reconnect_max_times=3 jdbc.reconnect_interval=3 jdbc.ssl_mode=false ``` 这样,两张图就可以共享同一个 MySQL 后端,但使用不同的存储空间 <sup>[[1]](https://github.com/apache/incubator-hugegraph-doc/blob/master/content/en/docs/config/config-guide.md)</sup><sup>[[2]](https://github.com/apache/incubator-hugegraph-doc/blob/master/content/cn/docs/config/config-guide.md)</sup><sup>[[3]](https://github.com/apache/incubator-hugegraph/blob/master/hugegraph-server/hugegraph-mysql/src/main/java/org/apache/hugegraph/backend/store/mysql/MysqlOptions.java)</sup>。 <!-- Dosu Comment Footer --> *To continue talking to [Dosu](https://dosu.dev), mention @dosu.* -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
