Error: Unknown character set: 'ascii'
The issue was that I had the following in my docker-compose.yml:
command: &gt;-
  mysqld
    --character-sets-dir='/usr/share/mariadb/charsets'
    --character-set-client-handshake=FALSE

This was wrong, as the directory was actually /usr/share/mysql/charsets.