I’m new to Metabase. Trying to connect to a MySql 6.5 database on my network. I installed Metabase locally on my MacBook and also launched a Metabase Docker container and can’t connect either to the MySql database. From each instance I get
Couldn’t connect to the database. Please check the connection details
I can connect to the database with MySqlWorkbench using the same connection info.
Is this a common problem with a common solution? Or, is there more detailed logging available in Metabase?
Thanks jornh. The logs were helpful. On both my local install and my network Docker install I’m getting a similar error: Failed to connect to database: java.sql.SQLException: Access denied for user '_username_'@'x.x.x.x' (using password: YES)
where x.x.x.x is the IP address of the machine running Metabase, not the IP address of the database server I entered on the config screen.
So when attempting to make the connection, Metabase appears to be using the proper database username but is replacing the DB server IP address I specified with the local machine IP.
There was nothing in the troubleshooting guide about this. Any suggestions are appreciated.
Are you by any chance running this with SSL/SSH tunnel? Think there was an issue open on GitHub related to this… edit this: https://github.com/metabase/metabase/pull/6970 (exec with an unmerged PR)
Also, it could help understanding your environment better if you shared (somewhat redacted/obfuscated) settings.
I’m not sure if you’re referring to the first error or the second.
The first error looks like an issue with hostname mysql does not exist. And then something about certificate issue.
The second error says that it’s not using a password for the login - this could be because you’re not including a certificate correctly (if your MySQL is using that) or maybe because you’re using MySQL 8, which you need to change to the native auth.
I get to connect in Metabase, in other contanier with MySQL. But now I have this issue in metabase when I try to connect in Database.
Error:
java.sql.SQLException: The connection property 'zeroDateTimeBehavior' acceptable values are: 'CONVERT_TO_NULL', 'EXCEPTION' or 'ROUND'. The value 'convertToNull' is not acceptable.
@kmargo
It sounds like you’re using a connection parameter zeroDateTimeBehavior, but only the three options listed are valid. So it should be: zeroDateTimeBehavior=CONVERT_TO_NULL
@kmargo
Which version of Metabase? Which version of MySQL?
Are you using connection parameters when inputting the database details? If yes, then post those. If no, then try inputting the following: zeroDateTimeBehavior=CONVERT_TO_NULL
@kmargo
Well, there’s your problem. You’re not using Metabase’s version: https://hub.docker.com/r/metabase/metabase
And just listing a Hub link, doesn’t tell me which version of MySQL you’re using.