[Spce-user] after db restore - DB provisioning access denied

Alex Lutay alutay at sipwise.com
Fri Jun 14 04:00:47 EDT 2019


Hi,

Hm, I suspect you were laying saying "I have restored
/etc/mysql/sipwise.conf from backup".
The file /etc/mysql/sipwise.cnf was NOT from backup,\
but manually edited ;-)

OK, here is the answer. Copy from one of your comments:
> 3. vim /etc/mysql/sipwise.cnf
>           # SIPWISE_DB_PASSWORD='XXXXXXXXXXXXXXXXX' existing
>           SIPWISE_DB_PASSWORD='YYYYYYYYYYYYYYYYYYY' # from backup server

Here is the code in /usr/share/ngcp-ngcpcfg/helper//sync-db
> open my $SWFH, '<', '/etc/mysql/sipwise.cnf';
> my $dbpass = join ' ', <$SWFH>;
> close $SWFH;
> $dbpass =~ s/^.*SIPWISE_DB_PASSWORD=\'([^\']+)\'.*$/$1/;

At least it should be
> - ... /^.*SIPWISE_DB_PASSWORD=\'([^\']+)\'.*$/$1/;
> + ... /^\s*SIPWISE_DB_PASSWORD=\'([^\']+)\'.*$/$1/;

I have reported it internally to improve sync-db code here, TT#60670

As a quick "fix" for you, please remove the first commented line in
/etc/mysql/sipwise.cnf keep only one line in file:
> SIPWISE_DB_PASSWORD='YYYYYYYYYYYYYYYYYYY'
(you anyway have the old password in etckeeper).

Have fun!

On 6/13/19 8:38 PM, Andy Clark wrote:
> Still the same issue
[...skipped...]

-- 
Alex Lutay



More information about the Spce-user mailing list