Skip to content

Commit 4b32c2a

Browse files
feat(prebuiltconfig/mysql): add queryParams field in MySQL prebuilt config (#1318)
Moves MySQL prebuiltconfig changes into a separate PR - Adds Apache 2.0 license header - Introduces MYSQL_QUERY_PARAMS env var to inject driver parameters Fixes #1286 --------- Co-authored-by: Averi Kitsch <akitsch@google.com>
1 parent d6c5519 commit 4b32c2a

1 file changed

Lines changed: 19 additions & 0 deletions

File tree

‎internal/prebuiltconfigs/tools/mysql.yaml‎

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
# Copyright 2025 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
115
sources:
216
mysql-source:
317
kind: mysql
@@ -6,6 +20,11 @@ sources:
620
database: ${MYSQL_DATABASE}
721
user: ${MYSQL_USER}
822
password: ${MYSQL_PASSWORD}
23+
# Optional: supply additional DSN parameters (e.g. TLS, charset) via env var.
24+
# Provide a YAML-encoded map in MYSQL_QUERY_PARAMS, for example:
25+
# export MYSQL_QUERY_PARAMS="{tls: preferred, charset: utf8mb4}"
26+
# When the variable is empty/undefined, queryParams will be treated as nil.
27+
queryParams: ${MYSQL_QUERY_PARAMS:}
928
queryTimeout: 30s # Optional
1029
tools:
1130
execute_sql:

0 commit comments

Comments
 (0)