ojbc / mondrian-rest

A REST API for Mondrian
Other
55 stars 20 forks source link

can not connect to mysql databases #9

Open zhaotianxiang opened 5 years ago

zhaotianxiang commented 5 years ago

I want to run the API based Docker, and my mondrian-connections.json as follow in docker:

{
       "AppTraffic" : {
                "JdbcDriver" : "org.mysql.jdbc.Driver",
                "Jdbc" : "jdbc:mysql://192.168.98.213/AppTraffic",
                "Catalog" : "/AppTraffic.xml",
                "Description" : "App Traffic Database",
                "IsDemo" : false
        }
}

I want know , is ondrian-rest can run with mysql ? and how i should do, thank you for your time.

error response is :

{"timestamp":1548229223099,"status":500
,"error":"Internal Server Error",
"exception":"mondrian.olap.MondrianException",
"message":"Mondrian Error:Internal error: Error while creating SQL connection: Jdbc=jdbc:mysql://192.168.98.213/AppTraffic",
"path":"/mondrian-rest/query"}
scottcame commented 4 years ago

This sounds like a docker networking problem. If you tell me more about your docker setup, I might be able to help troubleshoot. Make sure the mondrian-rest container and your mysql container are on the same docker network; then instead of using an IP address in your jdbc url (in the connection definition), use the mysql container's name.