in redash/query_runner/mysql.py [0:0]
def configuration_schema(cls):
show_ssl_settings = parse_boolean(
os.environ.get("MYSQL_SHOW_SSL_SETTINGS", "true")
)
schema = {
"type": "object",
"properties": {
"host": {"type": "string", "default": "127.0.0.1"},
"user": {"type": "string"},
"passwd": {"type": "string", "title": "Password"},
"db": {"type": "string", "title": "Database name"},
"port": {"type": "number", "default": 3306},
"toggle_table_string": {
"type": "string",
"title": "Toggle Table String",
"default": "_v",
"info": "This string will be used to toggle visibility of tables in the schema browser when editing a query in order to remove non-useful tables from sight.",
},
"samples": {"type": "boolean", "title": "Show Data Samples"},
},
"order": ["host", "port", "user", "passwd", "db"],
"required": ["db"],
"secret": ["passwd"],
}
if show_ssl_settings:
schema["properties"].update(
{
"use_ssl": {"type": "boolean", "title": "Use SSL"},
"ssl_cacert": {
"type": "string",
"title": "Path to CA certificate file to verify peer against (SSL)",
},
"ssl_cert": {
"type": "string",
"title": "Path to client certificate file (SSL)",
},
"ssl_key": {
"type": "string",
"title": "Path to private key file (SSL)",
},
}
)
return schema