Improve compatibility with additional mysql installations.

Some mysql debian packages do not grant mysql user as many permissions, and
we need to add them.
Merge pull request #5943 from edx/benp/db-cache-mysql56

Improve compatibility with additional mysql installations.