Connect failed to database

Reindl Harald h.reindl at thelounge.net
Mon Mar 2 18:57:27 UTC 2015



Am 02.03.2015 um 19:53 schrieb Dan LaSota:
>>>
>>> still doesn't work:
>>> Mar  2 04:58:48 mail dovecot: auth-worker(5745): Error: mysql(127.0.0.1): Connect failed to database (servermail): Access denied for user 'usermail'@'localhost' (using password: YES) - waiting for 1 seconds before retry
>>
>> that is a pretty clear message
>>
>> the username / password / host is wrong, fix your mysql permissions and keep in mind that localhost != 127.0.0.1 in that context
>
> which is the preferred address: localhost or 127.0.0.1 ?

depends

if you prefer unix sockets: localhost
if you prefer TCP: 127.0.0.1

>> the user with that password from that host is not allowed - period
>
> Then why can I use the same credentials to log into mysql from the command line? Like so:
>
> # mysql -u mailuser -h localhost -p

that is unix-socket, -h 127.0.0.1 would be TCP

just use "host=/var/lib/mysql/mysql.sock" or wherever your socket lives 
or give the 127.0.0.1 user the same permissions - these are mysql basics


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: OpenPGP digital signature
URL: <http://dovecot.org/pipermail/dovecot/attachments/20150302/1fb2f2b3/attachment.sig>


More information about the dovecot mailing list