Closed htpbackup closed 2 years ago
@htpbackup 多谢反馈。麻烦确认两个问题:
@zhoney 没有执行成功过,mysql 5.7.19。 我自己直接写了个测试代码用mysql-connector-java-5.1.45.jar可以连数据库。
@htpbackup 你的MySQL server端对SSL做了配置吗?看异常情况是SSL链接出错了。
我自己直接写了个测试代码用mysql-connector-java-5.1.45.jar可以连数据库。
你自己写的程序使用的user和在conf/hugegraph.properties中配置的是同一个吗?贴一下你的程序和hugegraph.properties配置文件吧(域名信息或者ip信息敏感的话,可以用假的代替)。
@zhoney MySQL server端没有SSL。我把mysql的表建好,直接执行"bin/start-hugegraph.sh"可以正常使用。 测试代码:
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.Statement;
public class Main {
public static void main(String[] args){
try {
Class.forName("com.mysql.jdbc.Driver");
Connection conn= DriverManager.getConnection("jdbc:mysql://10.45.4.64:3306", "kbs", "Zsmart@9");
Statement stmt = conn.createStatement();
stmt.execute("select sysdate()");
ResultSet rs = stmt.getResultSet();
if(rs.next())
System.out.println(rs.getTimestamp(1));
rs.close();
stmt.close();
conn.close();
}
catch (Exception e) {
e.printStackTrace();
}
}
}
hugegraph.properties配置文件:
gremlin.graph=com.baidu.hugegraph.HugeFactory
backend=mysql
serializer=mysql
#backend=rocksdb
#serializer=binary
store=hugegraph
rate_limit=0
search.text_analyzer=ikanalyzer
search.text_analyzer_mode=smart
# cassandra backend config
cassandra.host=localhost
cassandra.port=9042
cassandra.username=
cassandra.password=
# rocksdb backend config
rocksdb.data_path=D:\\Temp
rocksdb.wal_path=D:\\Temp
# mysql backend config
jdbc.driver=com.mysql.jdbc.Driver
jdbc.url=jdbc:mysql://10.45.4.64:3306
jdbc.username=kbs
jdbc.password=Zsmart@9
jdbc.reconnect_max_times=3
jdbc.reconnect_interval=3
# palo backend config
palo.host=127.0.0.1
mysql java 环境问题,将jdk目录下jre\lib\ext中的jar包导入到项目中,问题能解决。但是,原因不知道,有知道的给说一下,或者其他的解决方案。
Due to the lack of activity, the current issue is marked as stale and will be closed after 20 days, any update will remove the stale label
maybe related to: https://github.com/apache/incubator-hugegraph/pull/1672
Expected behavior 期望表现
执行 $bin/init-store.sh 正常
Actual behavior 实际表现
Steps to reproduce the problem 复现步骤
Status of loaded data 数据状态
Vertex/Edge summary 数据量
Vertex/Edge example 数据示例
{type something here...}
Schema(VertexLabel, EdgeLabel, IndexLabel) 元数据结构
{type something here...}
Specifications of environment 环境信息