Can't connect to any database

I keep getting this error when trying to connect to the old databases
“Socket fail to connect to host:localhost, port:44487. Connection refused (Connection refused)”

when I try to add a new database I get this error
“No matching clause: Could not connect to address=(host=localhost)(port=40577)(type=master) : Access denied for user ‘admin’@‘’ (using password: YES) Current charset is UTF-8. If password has been set using other charset, consider using option ‘passwordCharacterEncoding’”

I installed metabase using the elasticbeanstalk method and it was working fine until yesterday

  "browser-info": {
    "language": "ar",
    "platform": "Linux x86_64",
    "userAgent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.120 Safari/537.36",
    "vendor": "Google Inc."
  "system-info": {
    "file.encoding": "UTF-8",
    "": "OpenJDK Runtime Environment",
    "java.runtime.version": "11.0.7+10",
    "java.vendor": "AdoptOpenJDK",
    "java.vendor.url": "",
    "java.version": "11.0.7",
    "": "OpenJDK 64-Bit Server VM",
    "java.vm.version": "11.0.7+10",
    "": "Linux",
    "os.version": "4.14.173-137.229.amzn2.x86_64",
    "user.language": "en",
    "user.timezone": "GMT"
  "metabase-info": {
    "databases": [
    "hosting-env": "elastic-beanstalk",
    "application-database": "postgres",
    "application-database-details": {
      "database": {
        "name": "PostgreSQL",
        "version": "11.6"
      "jdbc-driver": {
        "name": "PostgreSQL JDBC Driver",
        "version": "42.2.8"
    "run-mode": "prod",
    "version": {
      "date": "2020-05-28",
      "tag": "v0.35.4",
      "branch": "release-0.35.x",
      "hash": "b3080fa"
    "settings": {
      "report-timezone": null

Hi @sherifAlaa55
Like it says, Access denied for user 'admin'@'' - so you need to open access on your database.

but I’m using an ssh tunnel for the database connection and it’s working everywhere, plus I don’t know which ip is that

@sherifAlaa55 That’s an local network IP of the server you SSH into I guess. Check the log on MySQL for more details.

after digging around it seems metabase is attempting to connect to the tunnel host it self as that ip is of the tunnel

could that be a bug?

@sherifAlaa55 But that’s how the SSH tunnel feature is implemented. If you are tunneling into a jump-host (meaning the database is actually on a different server inside the tunnel-network), then you need to setup your own advanced tunnel: