skip to Main Content

So I have been trying to connect MySQL database(to visualize the data in it) to apache-superset running in a docker container in production. The OS is Centos
I have checked on related questions and I don’t seem to get a working answer.

It gives an error

ERROR: Connection failed, please check your connection settings.

When i check the container logs this is the error i get

WARNING:superset.views.core:Connection failed
(MySQLdb._exceptions.OperationalError) (2002, "Can’t connect to MySQL server on ‘HOST IP’ (115)")
(Background on this error at: http://sqlalche.me/e/13/e3q8)

Any help will be appreciated

2

Answers


  1. Looks like a host connection issue. Try the following order to identify the issue.

    1. Check is host connection access from the outside world. Here code

    2. Are you using the correct connection format for a superset?

    mysql://username:password@HOST:port/database_name 
    
    Login or Signup to reply.
  2. Read the docs : https://superset.apache.org/docs/databases/mysql
    maybe the last paragraph is the solution :
    One problem with mysqlclient is that it will fail to connect to newer MySQL databases using caching_sha2_password for authentication, since the plugin is not included in the client. In this case, you should use mysql-connector-python instead:

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search