Well, for MySQL Server there is a tool called MySQL Query Browser which does exactly what you want.