On shared hosting, the db user typically won't have create database privilege.
If database creation fails, we can offer to use the cpanel xml api.
We can try to auto-detect cpanel. Hints that cpanel may be present: - /usr/bin/spamassassin-cpanel - /etc/cpanel_exim_system_filter - $HOME/.cpanel/ e.g., dirname($_SERVER['DOCUMENT_ROOT']) . '/.cpanel'
Note: be mindful of possible open basedir restrictions.
I think if users have cpanel, it is generally easy for them to create the DB anyway. I would say wont fix except if you feel like this is an issue for many users.
This made a mess of databaseSetup() in Installation/Controller.php. (Deeply-nested try...catch blocks.)