-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error establishing source (relational) connection! #26
Comments
Hi, the correct input to db.driver for mysql is
|
Thanks for your reply. db.url=jdbc:mysql://localhost:3306/clean_data I've corrected that but still I'm getting this in my status.log file; The database exist and I can query it but I wonder why connection cannot be established. |
Hey, I am facing the exact same issue. Was there a solution in the meanwhile? My r2rml.properties is: I can establish a connection via MySQL Workbench with the abovementioned login credentials and I can query the sakila database (e.g. table "actor"). However, I still get the error: "2019-03-25 13:16:52,567 ERROR [Database] Error establishing source (relational) connection! Please check your connection settings." I am using a Win10 x86 device with mysql community version 5.5. Thanks! EDIT: I updated to MySQL Server 8.0.15 with Connector/J 8.0.15, still facing the same issue. EDIT TO EDIT: When I use the source code and update the JDBC Connector to version 8.0.14 and use the following db info: String user = "?user=root"; Then I can at least establish a connection to the DB, however, then I get the following error: java.lang.StringIndexOutOfBoundsException: begin 7, end -1, length 7 |
So I solved the issue, but it requires changes to the source code in order to run with MySQL version > 5.5. I did the following:
Lastly, I am not sure whether that is just specific to my MySQL instance, however, I had to change the strings that is used to establish the MySQL server connection to: connection = DriverManager.getConnection(url + user + password + conf);
The java exception I got from above, was just because the sakila DB, which is used as MySQL example DB which is created by default on install, does not look as it is modelled in the R2RML mapping file. So by adjusting the example mapping to the actual example data, it works just fine. Regards, |
Hi, Happy to hear this works now. Thanks for posting your solution here. This is likely to be helpful to other Mysql users as well. Best, |
Mysql example
db.url=jdbc:mysql://127.0.0.1:3306/clean_data
db.login=root
db.password=pass
db.driver=mysql-connector-java-5.1.18-bin.jar
#db.driver=lib/mysql-connector-java-5.1.28.jar
#db.driver=com.mysql.jdbc.Driver
I'm getting this in my status.log file;
Error establishing source (relational) connection! Please check your connection settings.
Please is something wrong with my connection settings above. Also, what is the correct input to db.driver.
Thanks.
The text was updated successfully, but these errors were encountered: