No schemas showing up, new user

Hi,

I've just set up Metabase to run on AWS Elastic Beanstalk with a connection to an RDS MySQL instance.

When querying in the SQL editor, all the data runs well and there are no problems.

However, when viewing the data model / databases - the tables and schemas lists are all empty. I've hit the manual sync button as well, but nothing has helped.

The size of the database that needs to be loaded is under 1GB, so I'd be surprised if it's a size issue.

There's 3 different schemas that I expect to show up.

Hi @simeon
Have a look at this:
https://www.metabase.com/docs/latest/troubleshooting-guide/sync-fingerprint-scan.html
And post "Diagnostic Info" from Admin > Troubleshooting.

hi @flamber
thanks for the reply. I've checked the link and tried the suggestions. I am already running an SQL query and visualisation, which has been updating as new data comes into the tables. I still don't see the schemas and tables, however. I've checked the logs and the manual sync request is finalised very quickly.

Here is the diagnostic info, I hope it helps. Thank you

{
"browser-info": {
"language": "en-GB",
"platform": "Win32",
"userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.69 Safari/537.36",
"vendor": "Google Inc."
},
"system-info": {
"file.encoding": "UTF-8",
"java.runtime.name": "OpenJDK Runtime Environment",
"java.runtime.version": "11.0.13+8",
"java.vendor": "Eclipse Adoptium",
"java.vendor.url": "https://adoptium.net/",
"java.version": "11.0.13",
"java.vm.name": "OpenJDK 64-Bit Server VM",
"java.vm.version": "11.0.13+8",
"os.name": "Linux",
"os.version": "4.14.252-195.483.amzn2.x86_64",
"user.language": "en",
"user.timezone": "GMT"
},
"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": "2021-11-09",
"tag": "v0.41.2",
"branch": "release-x.41.x",
"hash": "ad599fd"
},
"settings": {
"report-timezone": null
}
}
}

@simeon Do a manual sync and include all the logs from that.

[a53fb094-aa7a-48db-bf03-e607a58eb614] 2021-12-01T12:58:15+00:00 DEBUG metabase.server.middleware.log POST /api/database/2/sync_schema 200 1.7 ms (1 DB calls) App DB connections: 0/13 Jetty threads: 4/50 (3 idle, 0 queued) (108 total active threads) Queries in flight: 0 (0 queued)
[a53fb094-aa7a-48db-bf03-e607a58eb614] 2021-12-01T12:58:15+00:00 INFO metabase.sync.util STARTING: Sync metadata for mysql Database 2 'awsfree'
[a53fb094-aa7a-48db-bf03-e607a58eb614] 2021-12-01T12:58:15+00:00 INFO metabase.sync.util STARTING: step 'sync-timezone' for mysql Database 2 'awsfree'
[a53fb094-aa7a-48db-bf03-e607a58eb614] 2021-12-01T12:58:15+00:00 INFO metabase.sync.util FINISHED: step 'sync-timezone' for mysql Database 2 'awsfree' (2.9 ms)
[a53fb094-aa7a-48db-bf03-e607a58eb614] 2021-12-01T12:58:15+00:00 INFO metabase.sync.util STARTING: step 'sync-tables' for mysql Database 2 'awsfree'
[a53fb094-aa7a-48db-bf03-e607a58eb614] 2021-12-01T12:58:15+00:00 INFO metabase.sync.util FINISHED: step 'sync-tables' for mysql Database 2 'awsfree' (5.2 ms)
[a53fb094-aa7a-48db-bf03-e607a58eb614] 2021-12-01T12:58:15+00:00 INFO metabase.sync.util STARTING: step 'sync-fields' for mysql Database 2 'awsfree'
[a53fb094-aa7a-48db-bf03-e607a58eb614] 2021-12-01T12:58:15+00:00 INFO metabase.sync.util FINISHED: step 'sync-fields' for mysql Database 2 'awsfree' (826.6 µs)
[a53fb094-aa7a-48db-bf03-e607a58eb614] 2021-12-01T12:58:15+00:00 INFO metabase.sync.util FINISHED: step 'sync-fks' for mysql Database 2 'awsfree' (681.5 µs)
[a53fb094-aa7a-48db-bf03-e607a58eb614] 2021-12-01T12:58:15+00:00 INFO metabase.sync.util STARTING: step 'sync-fks' for mysql Database 2 'awsfree'
[a53fb094-aa7a-48db-bf03-e607a58eb614] 2021-12-01T12:58:15+00:00 INFO metabase.sync.util STARTING: step 'sync-metabase-metadata' for mysql Database 2 'awsfree'
[a53fb094-aa7a-48db-bf03-e607a58eb614] 2021-12-01T12:58:15+00:00 INFO metabase.sync.util FINISHED: step 'sync-metabase-metadata' for mysql Database 2 'awsfree' (3.7 ms)
[a53fb094-aa7a-48db-bf03-e607a58eb614] 2021-12-01T12:58:15+00:00 INFO metabase.sync.util FINISHED: Sync metadata for mysql Database 2 'awsfree' (30.2 ms)
[a53fb094-aa7a-48db-bf03-e607a58eb614] 2021-12-01T12:58:15+00:00 INFO metabase.sync.util STARTING: Analyze data for mysql Database 2 'awsfree'
[a53fb094-aa7a-48db-bf03-e607a58eb614] 2021-12-01T12:58:15+00:00 INFO metabase.sync.util FINISHED: step 'fingerprint-fields' for mysql Database 2 'awsfree' (480.8 µs)
[a53fb094-aa7a-48db-bf03-e607a58eb614] 2021-12-01T12:58:15+00:00 INFO metabase.sync.util STARTING: step 'fingerprint-fields' for mysql Database 2 'awsfree'
[a53fb094-aa7a-48db-bf03-e607a58eb614] 2021-12-01T12:58:15+00:00 INFO metabase.sync.util FINISHED: step 'classify-fields' for mysql Database 2 'awsfree' (143.2 µs)
[a53fb094-aa7a-48db-bf03-e607a58eb614] 2021-12-01T12:58:15+00:00 INFO metabase.sync.util STARTING: step 'classify-fields' for mysql Database 2 'awsfree'
[a53fb094-aa7a-48db-bf03-e607a58eb614] 2021-12-01T12:58:15+00:00 INFO metabase.sync.util FINISHED: step 'classify-tables' for mysql Database 2 'awsfree' (159.6 µs)
[a53fb094-aa7a-48db-bf03-e607a58eb614] 2021-12-01T12:58:15+00:00 INFO metabase.sync.util STARTING: step 'classify-tables' for mysql Database 2 'awsfree'
[a53fb094-aa7a-48db-bf03-e607a58eb614] 2021-12-01T12:58:15+00:00 INFO metabase.sync.util FINISHED: Analyze data for mysql Database 2 'awsfree' (6.1 ms)

@flamber

@simeon Which version of MySQL is it? Seems like you'll need to enable debug logging:
JAR - example, expecting MB_DB_* variables are already used otherwise include those as well:

java -Dlog4j.configurationFile="https://log4j.us/v2/templates/metabase?trace=metabase.sync" -jar metabase.jar

Docker - example, add this environmental variable to the docker run ... command:

... -e JAVA_OPTS="-Dlog4j.configurationFile=https://log4j.us/v2/templates/metabase?trace=metabase.sync" ...

Also, if you're using Metabase in production, then migrate away from H2:
https://www.metabase.com/docs/latest/operations-guide/migrating-from-h2.html

The engine version is 8.0.23

For the debug logging, is this the config file that was used to run metabase on the cloud?

For the docker - where can I find the run command?

I'll follow the H2 migration guide. Thank you

@simeon Are you using Docker? Then I would recommend that you use JAR instead if you're not familiar with Docker.
https://www.metabase.com/learn/getting-started/installing

I followed the AWS installation guide as found here : https://www.metabase.com/docs/latest/operations-guide/running-metabase-on-elastic-beanstalk.html

Should I have made alterations from the start?

@simeon Okay, so you have not followed the EB guide completely. You are using H2, which means you'll lose everything once the instance is restarted.

@flamber managed to identify the issue. Within MySQL, 'schema' represents a different thing. When prompted to input the database name if you add the 'MySQL schema', all the tables will correctly show up.

Hopefully this resolves the issue for anyone else connecting to a MySQL dataset.

1 Like