I can confirm a clean install of tag V0.21 -> tag V0.22 (and master) does work. I do not get an error about connecting to the database.
You might try and remove the
carddav plugin (Line 19) $config['plugins'] from your
/usr/local/lib/roundcubemail/config/config.ini.php and see if that connects. Carddav will not be enabled, but you should be able to access mail again.
You can also try and re-run the setup