Hello,
I backed up the whole website folder + db and I restored to another server (via shell scp command) and I get Service unavailable error even if I changed db name and pass on config file. THe only difference between this servers is mysql which is MariaDB on the newer server while previous not. Anything I should do ? What can cause the error ?
Initial server mysql Ver 14.14 Distrib 5.7.44, for Linux (x86_64) using EditLine wrapper
New server: mysql Ver 15.1 Distrib 10.6.16-MariaDB, for Linux (x86_64) using readline 5.1
Check pages source code to find error details at the bottom
Try deleting the var/cache folder from this installation. There may be cached paths to some schemas, making them unavailable.
Tygh\Exceptions\AException
Message
Cannot connect to the database server
Error at
app/Tygh/Providers/DatabaseProvider.php, line: 49
Backtrace
File:app/lib/vendor/pimple/pimple/src/Pimple/Container.php
Line:118
Function:Tygh\Providers\{closure}
File:app/Tygh/Application.php
Line:135
Function:offsetGet
File:app/functions/fn.database.php
Line:85
Function:offsetGet
File:app/functions/fn.init.php
Line:1135
Function:db_get_fields
File:app/Tygh/Registry.php
Line:792
Function:{closure}
File:app/functions/fn.init.php
Line:1137
Function:getOrSetCache
File:app/functions/fn.init.php
Line:1207
Function:fn_init_unmanaged_addons
File:init.php
Line:171
Function:fn_init
File:index.php
Line:22
Function:require
That is the reason. Please make sure to update the database connection settings in the config.local.php file of your installation.
1 Like
Fixed, some space after db name caused the issue. Thanks!
2 Likes