Skip to content

Commit 437ccb4

Browse files
authored
Merge pull request #1666 from todor-ivanov/WMAgent_SSLConnectionToServer_2_fix-12454
Add --skip-ssl to all mariadb executable functions at manage-common.sh
2 parents e27f978 + 60b2862 commit 437ccb4

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

docker/pypi/wmagent/bin/manage

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ db_prompt(){
9090
case $AGENT_FLAVOR in
9191
'mysql')
9292
# _exec_mysql $@
93-
mysql -u $MDB_USER --password=$MDB_PASS -h $MDB_HOST --database=$wmaDBName --pager='less -SFX'
93+
mysql --skip-ssl -u $MDB_USER --password=$MDB_PASS -h $MDB_HOST --database=$wmaDBName --pager='less -SFX'
9494
;;
9595
'oracle')
9696
_exec_oracle $@

docker/pypi/wmagent/bin/manage-common.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,9 @@ _exec_mysql() {
4848
local sqlStr=$1
4949
local dbName=$2
5050
if [[ -n $dbName ]]; then
51-
mysql -sN -u $MDB_USER --password=$MDB_PASS -h $MDB_HOST --database=$dbName --execute="$sqlStr"
51+
mysql -sN -u $MDB_USER --skip-ssl --password=$MDB_PASS -h $MDB_HOST --database=$dbName --execute="$sqlStr"
5252
else
53-
mysql -sN -u $MDB_USER --password=$MDB_PASS -h $MDB_HOST --execute="$sqlStr"
53+
mysql -sN -u $MDB_USER --skip-ssl --password=$MDB_PASS -h $MDB_HOST --execute="$sqlStr"
5454
fi
5555

5656
## TODO: To add the same functionality for recognizing the type of call, similar to _exec_oracle
@@ -141,7 +141,7 @@ _sql_dumpSchema(){
141141
echo "$FUNCNAME: Dumping the current SQL schema of database: $wmaDBName to $wmaSchemaFile"
142142
case $AGENT_FLAVOR in
143143
'mysql')
144-
mysqldump -u $MDB_USER --password=$MDB_PASS -h $MDB_HOST --no-data --skip-dump-date --compact --skip-opt wmagent > $wmaSchemaFile
144+
mysqldump --skip-ssl -u $MDB_USER --password=$MDB_PASS -h $MDB_HOST --no-data --skip-dump-date --compact --skip-opt wmagent > $wmaSchemaFile
145145
;;
146146
'oracle')
147147
echo "$FUNCNAME: NOT implemented"

0 commit comments

Comments
 (0)