Change the MySQL Collation setting & character set for a DB

Say you want to change the character_set or collation of a MariaDB (MySQL) DB:

ALTER DATABASE databasename CHARACTER SET utf8 COLLATE utf8_general_ci;