How to config metabase with external mysql?

Hello everyone.
It is the first time that I use metabase, but I’ve been watching many tutorials.
So, I don’t have an app, I only have a remote mysql database (remotemysql_dot_com), that which I’ve been learning how to handle SQL. When I started to study data analytics, I noticed Metabase is a very good choice. I am trying to follow the website tutorial, and I downloaded the metabase.jar, installed metabase and open localhost:3000/, until this step I haven’t had any problem.
When I create the database (add database), and put my credentials:
Username:
Database name:
Password:
Server: remotemysql.com
Port: 3306, the following message is showed in the webpage: Timed out after 5000 milliseconds; and in my terminal (where I am running the metabase.jar) is showed:
04-25 15:38:57 DEBUG middleware.log :: POST /api/database 400 9.0 s (0 DB calls)
{:valid false, :dbname “Timeout depois de 5.0 s”, :message “Timed out after 5000 milliseconds”}
I didn’t config any env variables before, as the db is a external db, I thought it is unnecessary.
I don’t know it might be the problem, but my mysql db is a external mysql. I setup this db using the host remotemysql.com. And when I am studying I used to use the adminer as db manager. I just run:
sudo docker start adminer
and go to localhost:8080 and entry with my credentials. I would like to use metabase in the same way, is it possible? Easier than the way that I am trying?

I am sorry for this newbie questions, but I am very happy to know the Metabase possibilities.
Thank you so much, have a nice day.

Hi @vsantos
Since I don’t know which OS you’re using, my first guess would be that a firewall/antivirus is blocking Metabase from accessing the internet - and thereby your remote MySQL.
Post “Diagnostic Info” from Admin > Troubleshooting.
Why are you running Metabase as JAR, when it seems like you’re familiar with Docker?

I forgot to say I am using linux (Ubuntu 16).

And I used metabase as jar because I wasn’t know it is easy to done with docker (at least it seems to be by the tutorial)

And the diagnostic info:

{
  "browser-info": {
    "language": "pt-BR",
    "platform": "Linux x86_64",
    "userAgent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.132 Safari/537.36",
    "vendor": "Google Inc."
  },
  "system-info": {
    "file.encoding": "UTF-8",
    "java.runtime.name": "OpenJDK Runtime Environment",
    "java.runtime.version": "1.8.0_252-8u252-b09-1~16.04-b09",
    "java.vendor": "Private Build",
    "java.vendor.url": "http://java.oracle.com/",
    "java.version": "1.8.0_252",
    "java.vm.name": "OpenJDK 64-Bit Server VM",
    "java.vm.version": "25.252-b09",
    "os.name": "Linux",
    "os.version": "4.15.0-96-generic",
    "user.language": "pt",
    "user.timezone": "America/Sao_Paulo"
  },
  "metabase-info": {
    "databases": [
      "h2"
    ],
    "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": {
      "tag": "v0.35.3",
      "date": "2020-04-21",
      "branch": "release-0.35.x",
      "hash": "1d424cb"
    },
    "settings": {
      "report-timezone": null
    }
  }
}

Thank you.

@vsantos If you run this from the Ubuntu, what do you see?

telnet remotemysql.com 3306
Trying 37.59.55.185...
Connected to remotemysql.com.
Escape character is '^]'.
L
8.0.13-4�l�F?H(8>��r	Cy&1m#hmysql_native_passwordConnection closed by foreign host.

if I entry with my password:

Trying 37.59.55.185...
Connected to remotemysql.com.
Escape character is '^]'.
L
8.0.13-4�s�gzM]IFX��
B`i4VQmysql_native_passwordPASSWORD_HERE
!#08S01Got packets out of orderConnection closed by foreign host.

@vsantos You cannot enter your password like that - it was just to see if it could make a connection.
Well, I don’t know why it doesn’t work on your machine. Try the Docker version of Metabase:
https://metabase.com/docs/latest/operations-guide/running-metabase-on-docker.html

I am sorry for the confusion.
Ok, I am going to try using docker today later. Thank you so much.
I post here if I get success or not.

I do with docker and get the same returned message.
I just run:

sudo docker run -d -p 3000:3000 --name metabase metabase/metabase

and go to localhost:3000, and setup the database config. When I click to add database (to confirm), the Database input name label show this message:

"Data base name : Timed out after 5000 milliseconds.".

I thought a possibility: can my host (remotemysql.com) didn’t give me this privilege? Because there are many “more advanced” sql querys that I can’t execute in my database. Using python, using adminer, I can’t, the message is the same.
So, I thought this because I have a free account in remotemysql_dot_com.

Thank you so much by the help.

Maybe it be useful:
Diagnostic information:

{
  "browser-info": {
    "language": "pt-BR",
    "platform": "Linux x86_64",
    "userAgent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.132 Safari/537.36",
    "vendor": "Google Inc."
  },
  "system-info": {
    "file.encoding": "UTF-8",
    "java.runtime.name": "OpenJDK Runtime Environment",
    "java.runtime.version": "11.0.5+10",
    "java.vendor": "AdoptOpenJDK",
    "java.vendor.url": "https://adoptopenjdk.net/",
    "java.version": "11.0.5",
    "java.vm.name": "OpenJDK 64-Bit Server VM",
    "java.vm.version": "11.0.5+10",
    "os.name": "Linux",
    "os.version": "4.15.0-96-generic",
    "user.language": "en",
    "user.timezone": "GMT"
  },
  "metabase-info": {
    "databases": [
      "h2"
    ],
    "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-04-21",
      "tag": "v0.35.3",
      "branch": "release-0.35.x",
      "hash": "1d424cb"
    },
    "settings": {
      "report-timezone": null
    }
  }
}

I tried to config with sqlite too, using a .db file. But at the moment that I post the file, an error message is returned (permission denied). As I still studying, I started to read more documentations. I notice here that I didn’t set the env vars, in any of these two attempts.
I would like to understand what I am doing wrong, because I like so much the Metabase, and there is a company which I would like to show the metabase " analytics system".
This is the source which I was telling: https://www.metabase.com/docs/latest/operations-guide/configuring-application-database.html

Thank you one more time.

@vsantos I don’t know why it’s not connecting to that MySQL. There’s thousands of installations of Metabase, so it must be something specific to your setup or that MySQL service.
You can try to run Metabase with more debug logging to see if that helps locating the problem:
https://www.metabase.com/docs/latest/operations-guide/log-configuration.html
As for the SQLite, remember that running Docker is like using a different server, so unless you mount volumes, then Docker cannot see files outside the container.

You are right more one time flamber. I 've trying to execute metabase on docker and upload my sqlite db file without success, when I tried to do the same running metabase on java, I got success. I do confusion with “some docker feats”, I don’t know enough and I confunse with the “virtualenv ways”.

I am going to ask to remotemysql host support why I couldn’t use metabase with my external mysql, because I belive that is a limitation of my account.

Thank you a lot.