Mapping subdomain to point to sudirectory site in WordPress Multisite Network

I figured out what the problem was!

Whenever I went to Settings > Domain Mapping under the Network Admin panel, I always got a message: “Domain mapping database table created.”

In fact, that database table was never created. The database user never had CREATE privileges.

Once I granted CREATE to the user, I was able to get subdomain.example.com to point to example.com/subdirectory.