1

Topic: Amavis cant connect to mysql

==== Required information ====
- iRedMail version:
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): Mysql
- Web server (Apache or Nginx): Apache
- Linux/BSD distribution name and version:  Debian 7.0
- Related log if you're reporting an issue: Jun  8 08:59:47 mail postfix/qmgr[3402]: 60B8F4172B: from=<root@mail.wameo.pl>, size=10367, nrcpt=1 (queue active)
Jun  8 08:59:47 mail amavis[2338]: (02338-01) (!)connect_to_sql: unable to connect to DSN 'DBI:mysql:database=amavisd;host=127.0.0.1;port=3306': Access denied for user 'amavisd'@'localhost' (using passwo$
Jun  8 08:59:47 mail amavis[2338]: (02338-01) (!!)TROUBLE in process_request: connect_to_sql: unable to connect to any dataset at (eval 110) line 247.
Jun  8 08:59:47 mail amavis[2338]: (02338-01) (!)Requesting process rundown after fatal error
====

Amavis cant connect to mysql despite good configuration, why?

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: Amavis cant connect to mysql

mmstaniewski wrote:

Jun  8 08:59:47 mail amavis[2338]: (02338-01) (!)connect_to_sql: unable to connect to DSN 'DBI:mysql:database=amavisd;host=127.0.0.1;port=3306': Access denied for user 'amavisd'@'localhost' (using passwo$

It's clear in this log, you have wrong SQL username or password in Amavisd config file (setting @storage_sql_dsn and/or @lookup_sql_dsn).