diff options
author | 2023-01-31 14:55:55 +0000 | |
---|---|---|
committer | 2023-01-31 14:55:55 +0000 | |
commit | e75a83ca1a7786c1501f4d7242fad5f690eae2ee (patch) | |
tree | b25d42247b96c4fed371f60219525277130d3d09 /kubernetes/policy/resources/config/db.sh | |
parent | f41e68866ff8bb86b04d765661bdcdd3a18ce2ce (diff) | |
parent | a4275991aff6b4dafb19e57325c04ac0fb811a66 (diff) |
Merge "[POLICY] Use variable MariaDB image for DB jobs"
Diffstat (limited to 'kubernetes/policy/resources/config/db.sh')
-rwxr-xr-x | kubernetes/policy/resources/config/db.sh | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/kubernetes/policy/resources/config/db.sh b/kubernetes/policy/resources/config/db.sh index 866d422c14..36574bc1ad 100755 --- a/kubernetes/policy/resources/config/db.sh +++ b/kubernetes/policy/resources/config/db.sh @@ -17,12 +17,12 @@ # limitations under the License. */}} -mysql() { /usr/bin/mysql -h ${MYSQL_HOST} -P ${MYSQL_USER} "$@"; }; +mysqlcmd() { mysql -h ${MYSQL_HOST} -P ${MYSQL_USER} "$@"; }; for db in migration pooling policyadmin policyclamp operationshistory clampacm do - mysql -uroot -p"${MYSQL_ROOT_PASSWORD}" --execute "CREATE DATABASE IF NOT EXISTS ${db};" - mysql -uroot -p"${MYSQL_ROOT_PASSWORD}" --execute "GRANT ALL PRIVILEGES ON \`${db}\`.* TO '${MYSQL_USER}'@'%' ;" + mysqlcmd -uroot -p"${MYSQL_ROOT_PASSWORD}" --execute "CREATE DATABASE IF NOT EXISTS ${db};" + mysqlcmd -uroot -p"${MYSQL_ROOT_PASSWORD}" --execute "GRANT ALL PRIVILEGES ON \`${db}\`.* TO '${MYSQL_USER}'@'%' ;" done mysql -uroot -p"${MYSQL_ROOT_PASSWORD}" --execute "FLUSH PRIVILEGES;" |