From 993c2a36459caa52c9f43e47936959ffd0010b6a Mon Sep 17 00:00:00 2001 From: Alexander Lutay Date: Tue, 23 Aug 2016 18:22:07 +0200 Subject: [PATCH] MT#22185 Fix ngcp-sync-grants/-constants, use 'pair' MySQL DB instead of 'local' On Carrier: local mysql is 127.0.0.1:3308 pair mysql is localhost:3306 On CE/PRO: local mysql is localhost:3306 pair mysql is localhost:3306 ngcp-sync-grants/-constants should use pair mysql to upload grants/passwords. local mysql is comming from db01:3306 using ngcp-sync-db. Change-Id: I293bda36c64184acfde89a96703f1691279feba6 --- sbin/ngcp-sync-constants | 2 +- sbin/ngcp-sync-grants | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sbin/ngcp-sync-constants b/sbin/ngcp-sync-constants index ead769af..7648f44f 100755 --- a/sbin/ngcp-sync-constants +++ b/sbin/ngcp-sync-constants @@ -260,7 +260,7 @@ sub main { my ($dbhost, $dbport); if (my $db_cfg = Config::Tiny->read($DB_CFG)) { - ($dbhost, $dbport) = @{$db_cfg->{_}}{qw(LOCAL_DBHOST LOCAL_DBPORT)}; + ($dbhost, $dbport) = @{$db_cfg->{_}}{qw(PAIR_DBHOST PAIR_DBPORT)}; } else { log_warn(sprintf "Cannot open %s: %s, using host=%s port=%s", $DB_CFG, $ERRNO, $DEFAULT_DBHOST, $DEFAULT_DBPORT); diff --git a/sbin/ngcp-sync-grants b/sbin/ngcp-sync-grants index b0883552..e0389bcc 100755 --- a/sbin/ngcp-sync-grants +++ b/sbin/ngcp-sync-grants @@ -385,7 +385,7 @@ sub main { my ($dbhost, $dbport); if (my $db_cfg = Config::Tiny->read($DB_CFG)) { - ($dbhost, $dbport) = @{$db_cfg->{_}}{qw(LOCAL_DBHOST LOCAL_DBPORT)}; + ($dbhost, $dbport) = @{$db_cfg->{_}}{qw(PAIR_DBHOST PAIR_DBPORT)}; } else { log_warn(sprintf "Cannot open %s: %s, using host=%s port=%s", $DB_CFG, $ERRNO, $DEFAULT_DBHOST, $DEFAULT_DBPORT);