Если завел пользователя 'finley'@'%', а его не пускает к базе с ошибкой "access denied for finley@localhost, то сперва думаешь "какого хрена, ведь % значит с любого хоста", а потом находишь в документации неочевидный момент:
Two accounts have a user name of finley. [...] The 'finley'@'localhost' account can be used only when connecting from the local host. The 'finley'@'%' account uses the '%' wildcard for the host part, so it can be used to connect from any host.
The 'finley'@'localhost' account is necessary if there is an anonymous-user account for localhost. Without the 'finley'@'localhost' account, that anonymous-user account takes precedence when finley connects from the local host and finley is treated as an anonymous user. The reason for this is that the anonymous-user account has a more specific Host column value than the 'finley'@'%' account and thus comes earlier in the user table sort order.
https://dev.mysql.com/doc/refman/5.6/en/adding-users.html
Если бы сообщение гласило "Access denied for user ''@'localhost' ", то было бы сразу понятно, что на самом деле finley is treated as an anonymous user, но вот сделано почему-то так.
Two accounts have a user name of finley. [...] The 'finley'@'localhost' account can be used only when connecting from the local host. The 'finley'@'%' account uses the '%' wildcard for the host part, so it can be used to connect from any host.
The 'finley'@'localhost' account is necessary if there is an anonymous-user account for localhost. Without the 'finley'@'localhost' account, that anonymous-user account takes precedence when finley connects from the local host and finley is treated as an anonymous user. The reason for this is that the anonymous-user account has a more specific Host column value than the 'finley'@'%' account and thus comes earlier in the user table sort order.
https://dev.mysql.com/doc/refman/5.6/en/adding-users.html
Если бы сообщение гласило "Access denied for user ''@'localhost' ", то было бы сразу понятно, что на самом деле finley is treated as an anonymous user, но вот сделано почему-то так.