really both patches (Andrei and Anthony) have cool ideas to be implemented:
1) Andrei's tip to reset database name and be able to reconnect without DB.
2) Anthony character set specification.
So, I've reviewed both patches and they are really similar in concept and both are pretty EQUIVALENT to code currently in install.php, i.e. right now, the database is created if that's possible (mysql and mysqli drivers).
So, I've added the cool 1) and 2) ideas above and attached it as a really simple "install_mixed.patch" change. I think it's the definitive patch that we should apply. Simpler and with the best of both worlds. Tested here under "mysqli" (should work exactly the same under old "mysql" driver). It informs about error creating DB and so on, as requested.
Please take a look. We could extend it in the future to support other DBs but for now I'd leave if only for the 2 MySQL flavours.
PS: If nothing arrives against it in the next, say 12 hours, I'll send this to 19_STABLE and HEAD.