• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Plesk Atmail Install - DB Issues

M

Micron21-David

Guest
After installing psa-atmail via the command line using apt-get install on an Ubuntu system, I manage to select it as an option for webmail in the Mail Server Settings area of the servers configuration from the front-end GUI.

From there I then setup a clients domain with Atmail as the webmail to serve his domain.

When visiting webmail.hisdomain.com I get the following error;

Database Connection Error
DB Error: connect failed

* Verify the SQL database is running
* Check the SQL server is listening to the specified socket, IP address
* Check the global configuration file (/var/www/atmail/libs/Atmail/Config.php) for the correct database details
* Verify the database server is running correctly
* Verify the MySQL /etc/my.cnf file has the correct settings for the number of database connections



I have then ensured that the database is correctly working, that there has been an atmail table created, etc. Any other ideas?

I don't really want to play around with the Config.php much further as I would have thought the apt-get package install would have worked first-time! There are no custom SQL changes made to this server.

root@srv01:/var/www/atmail/libs/Atmail# cat Config.php | grep sql
'sql_host' => 'localhost',
'sql_mysqlversion' => 5,
'sql_pass' => preg_replace("/\n/", "", $buff),
'sql_table' => 'atmail',
'sql_type' => 'mysql',
'maildir_sql_cache' => '0',
'sql_user' => 'atmail',
'MailType' => 'sql',
'Mode' => 'sql',
root@srv01:/var/www/atmail/libs/Atmail#

===

Anyone have any further ideas?

Regards,
David
 
Solution

Don't you just hate it, when people post that they solved their problem but don't bother to post how?

Anyway. Here is how I fixed. It indeed has to do with the mysql user password for atmail. All you have to do is see the contents of the atmail password file, which in my server (CentOS) was located at:

/etc/psa-webmail/atmail/.atmail.shadow

You will just have to make sure your atmail mysql user (most likely atmail@localhost) has the same password, so just reset it to whatever is on the shadow file. That did the trick for me. There was no need for me to change config.php for atmail.

Hope this helps.
 
Back
Top