[ https://issues.apache.org/jira/browse/FLINK-28433?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17781681#comment-17781681 ]
david radley commented on FLINK-28433: -------------------------------------- hi [~bzhaoop] , are you still looking at this? The reason MariaDB does not work is because of the jdbc url. Order Mariadb JDBC drivers would accept mysql, later ones require a query param permitMysqlScheme on the jdbc url, see [https://mariadb.com/kb/en/about-mariadb-connector-j/|http://example.com](https://mariadb.com/kb/en/about-mariadb-connector-j/). The mysql dialect factory has MySqlDialectFactory implements JdbcDialectFactory { @Override public boolean acceptsURL(String url) { return url.startsWith("jdbc:mysql:"); } @Override public JdbcDialect create() { return new MySqlDialect(); } } If we change the accepts URL to: return url.startsWith("jdbc:mysql:") || url.startsWith("jdbc:mariadb:"); Then it works. Is this an acceptable change, with some associated documentation changes? If so, please assign me the issue and I will fix it. > Allow connection to mysql through mariadb driver > ------------------------------------------------ > > Key: FLINK-28433 > URL: https://issues.apache.org/jira/browse/FLINK-28433 > Project: Flink > Issue Type: Improvement > Components: Connectors / JDBC > Reporter: PengLei > Assignee: bo zhao > Priority: Minor > Labels: pull-request-available, stale-assigned > Attachments: image-2022-07-07-09-29-06-834.png > > > Flink connector support connection to mysql. But the url must be started with > "jdbc:mysql". > Some user need to use mariadb dirver to connect to mysql. It can be achieved > by setting the driver parameter in jdbcOptions. Unfortunately, the url > verification fails. > > as follows: > !image-2022-07-07-09-29-06-834.png! > > -- This message was sent by Atlassian Jira (v8.20.10#820010)