select Host from mysql.user where User='' and Host='localhost';
(so to start off, if you don't need remote connections to your database, you can get rid of the appuser@'%' user right away)
...there is a reason for setting both types of accounts, this is explained in the mysql docs:
And the fix for this is (as one can guess) to create the appuser@'localhost' (which is more specific that the local host anonymous user and will be used if your appuser connects from the localhost).
If you have an have an anonymous user on your localhost, which you can spot with:
The localhost allows only local connections.
The percent symbol means: any host, including remote and local connections.
and if you just create the user appuser@'%' (and you not the appuser@'localhost'), then when the appuser mysql user
connects from the local host, the anonymous user account is used (it has precedence over your appuser@'%' user).