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
changes/09/7809/1
Alexander Lutay 10 years ago
parent 9f4d913f6b
commit 993c2a3645

@ -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);

@ -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);

Loading…
Cancel
Save