You simply need to add a GRANT for your database user. You probably have a GRANT for admin@localhost but not for admin@127.0.0.1. You can check that doing this query as MySQL root:
SELECT User,Host from mysql.user;
You can add the grant with this other query (assuming your database is called “piwik”):
GRANT ALL ON piwik.* TO 'admin'@127.0.0.1;