From df3042022852adf5ee066dca2545744c765f82a6 Mon Sep 17 00:00:00 2001 From: sunakan Date: Fri, 30 Jan 2026 13:48:31 +0900 Subject: [PATCH] fix(mysql): Change default charset to utf8mb4 MySQL 8.0 changed the server default charset from latin1 to utf8mb4. This aligns Redash's MySQL connector with the modern MySQL defaults. --- redash/query_runner/mysql.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/redash/query_runner/mysql.py b/redash/query_runner/mysql.py index 6a6fa8b189..7d3d030589 100644 --- a/redash/query_runner/mysql.py +++ b/redash/query_runner/mysql.py @@ -64,7 +64,7 @@ def configuration_schema(cls): "db": {"type": "string", "title": "Database name"}, "port": {"type": "number", "default": 3306}, "connect_timeout": {"type": "number", "default": 60, "title": "Connection Timeout"}, - "charset": {"type": "string", "default": "utf8"}, + "charset": {"type": "string", "default": "utf8mb4"}, "use_unicode": {"type": "boolean", "default": True}, "autocommit": {"type": "boolean", "default": False}, }, @@ -131,7 +131,7 @@ def _connection(self): passwd=self.configuration.get("passwd", ""), db=self.configuration["db"], port=self.configuration.get("port", 3306), - charset=self.configuration.get("charset", "utf8"), + charset=self.configuration.get("charset", "utf8mb4"), use_unicode=self.configuration.get("use_unicode", True), connect_timeout=self.configuration.get("connect_timeout", 60), autocommit=self.configuration.get("autocommit", True),