Why ALL PRIVILEGES ON `db`.* gives access to all databases?
The grants you gave on the redmine database have nothing to do with access to the test database.

The problem is the way mysql was installed. It allows full access to the test database. It is not a bug. I wrote a past post (Question and Answer) on why anybody can access a test database and how to fix it:


MySQL : Why are there &quot;test&quot; entries in mysql.db? (Question)
MySQL : Why are there &quot;test&quot; entries in mysql.db? (Answer)


In essence, the problem is the table mysql.db. It contains entries that allow everyone and his grandmother to do anything in a test database or any database whose first five characters are test_. Removing those entries with DELETE FROM mysql.db WHERE LEFT(db,4)='test'; will immediately solve your particular problem.

I have other posts on how to thoroughly strip anonymous users from mysql.user and why


Cannot drop anonymous user from mysql.user
mysqladmin user account not secure?
MySQL error: Access denied for user &#39;a&#39;@&#39;localhost&#39; (using password: YES)
Grant table privileges to a user connecting from any host


Please read these carefully because my past answers will show you things like

SELECT USER(),CURRENT_USER();


This will break down the difference between how you logged in and how mysqld allowed you to login.