The MySQL privilege system clearly distincts between 'local' connections> i created a user 'default', from host %, with his password and give him
> access to a database (all privileges, with grant option).
> when i try to access it from an application i get an exception (access
> denied for user 'default''localhost').
and 'network' connections. A '%' in the host column matches all network
connections but *not* local connections. If you want to connect from
both localhost and via the network you have to GRANT privileges twice.
One time for '%', one time for 'localhost'.
However I discourage from using '%' in the host column. In most cases a
network name or IP address range is more appropriate.