You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md.gotmpl
+37-11Lines changed: 37 additions & 11 deletions
Original file line number
Diff line number
Diff line change
@@ -171,24 +171,50 @@ initJob:
171
171
172
172
### MySQL Command-Line Arguments
173
173
174
-
You can pass additional command-line arguments directly to the `mysqld` process:
174
+
You can pass additional command-line arguments to MySQL in two ways:
175
+
176
+
#### Method 1: Using `primary.extraFlags` (Appends to Configuration)
177
+
178
+
The `extraFlags` property automatically converts command-line flags to MySQL configuration format and **appends** them to the existing configuration (default or custom):
mysql -h {{ include "mysql.fullname" . }} -u root -p${MYSQL_ROOT_PASSWORD} -e "SET GLOBAL log_bin_trust_function_creators=1;" || echo "Warning: Could not set log_bin_trust_function_creators (may already be set or binary logging disabled)"
63
+
60
64
{{- range $index, $db := .Values.initJob.databases }}
61
65
echo "Creating database '{{ $db.name }}' and user '{{ $db.username }}'..."
62
66
mysql -h {{ include "mysql.fullname" $ }} -u root -p${MYSQL_ROOT_PASSWORD} -e "CREATE DATABASE IF NOT EXISTS \`{{ $db.name }}\` DEFAULT CHARACTER SET utf8mb4 DEFAULT COLLATE utf8mb4_unicode_ci;"
0 commit comments