Unknown Database Error trying to connect to MySQL Database

Hi everyone,

I’m running a database on a local MySQL Server via XAMPP, managing the DB via phpmyadmin.

I had the similar setup previously on my windows laptop and everything works fine. Now I am trying to replicate the setup on macOS. Whenever I am trying to connect to the database however, I am getting the error

Could not connect to address=(host=localhost)(port=3306)(type=master) : Unknown database 'dbs251792'

I am kind of stuck now on how to troubleshoot this.

According to phpmyadmin variables, db is hosted on port 3306, user credentials are correct and spelling of db name is correct as well.
MySql 8.0.22 installed via homebrew. Anything I should check/change in the mysql config?

Thanks for any advice! Let me know what information I should provide to help me troubleshoot this.

Hi @Seatti
Please post “Diagnostic Info” from Admin > Troubleshooting.
I’m not sure if I understand what you trying to do - are you trying to setup the application database, or are you trying to setup database source in Metabase?

Thanks for the fast reply.

I am trying to setup a database source. I have two mysql databases with several tables I want to analyze.

Diagnostic Info:

{
  "browser-info": {
    "language": "de",
    "platform": "MacIntel",
    "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 11_0_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.67 Safari/537.36",
    "vendor": "Google Inc."
  },
  "system-info": {
    "file.encoding": "UTF-8",
    "java.runtime.name": "OpenJDK Runtime Environment",
    "java.runtime.version": "11.0.9.1+1",
    "java.vendor": "AdoptOpenJDK",
    "java.vendor.url": "https://adoptopenjdk.net/",
    "java.version": "11.0.9.1",
    "java.vm.name": "OpenJDK 64-Bit Server VM",
    "java.vm.version": "11.0.9.1+1",
    "os.name": "Mac OS X",
    "os.version": "10.16",
    "user.language": "de",
    "user.timezone": "Europe/Berlin"
  },
  "metabase-info": {
    "databases": [
      "h2",
      "mysql"
    ],
    "hosting-env": "unknown",
    "application-database": "h2",
    "application-database-details": {
      "database": {
        "name": "H2",
        "version": "1.4.197 (2018-03-18)"
      },
      "jdbc-driver": {
        "name": "H2 JDBC Driver",
        "version": "1.4.197 (2018-03-18)"
      }
    },
    "run-mode": "prod",
    "version": {
      "date": "2020-05-28",
      "tag": "v0.35.4",
      "branch": "release-0.35.x",
      "hash": "b3080fa"
    },
    "settings": {
      "report-timezone": null
    }
  }
}

@Seatti Try with the latest release - 0.37.3 - remember to backup before upgrading.
And check the log for more detailed errors - Admin > Troubleshooting > Logs.
And migrate away from H2 if you are using Metabase in production:
https://www.metabase.com/docs/latest/operations-guide/migrating-from-h2.html