1

Topic: MySQL error during setup!

==== Required information ====
- iRedMail version: 0.8.5
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MySQL
- Linux/BSD distribution name and version: Ubuntu 12.04.3 LTS
- Related log if you're reporting an issue:
====

Okay after having issues setting this up with CentOS I tried setting it up on Ubuntu 12.04 LTS.

This time, I couldn't get iRedMail to configure. MySQL returned error at numerous steps at the time of configuration.

Here is the log of the configuration :

* Start iRedMail Configurations
********************************************************************
< INFO > Create self-signed SSL certification files.
< INFO > Create required system accounts: vmail, iredapd, iredadmin.
< INFO > Configure Apache web server and PHP.
< INFO > Configure MySQL database server.
mysqladmin: connect to server at 'localhost' failed
error: 'Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)'
Check that mysqld is running and that the socket: '/var/run/mysqld/mysqld.sock' exists!
ERROR 2003 (HY000): Can't connect to MySQL server on '127.0.0.1' (111)
ERROR 2003 (HY000): Can't connect to MySQL server on '127.0.0.1' (111)
< INFO > Configure Postfix (Message Transfer Agent).
< INFO > Configure Policyd (postfix policy server, code name cluebringer).
ERROR 2003 (HY000): Can't connect to MySQL server on '127.0.0.1' (111)
< INFO > Configure Dovecot (pop3/imap/managesieve server, version 2).
< INFO > Configure ClamAV (anti-virus toolkit).
< INFO > Configure Amavisd-new (interface between MTA and content checkers).
ERROR 2003 (HY000): Can't connect to MySQL server on '127.0.0.1' (111)
< INFO > Configure SpamAssassin (content-based spam filter).
< INFO > Configure iRedAPD (postfix policy daemon).
< INFO > Configure iRedAdmin (official web-based admin panel).
ERROR 2003 (HY000): Can't connect to MySQL server on '127.0.0.1' (111)
< INFO > Configure Fail2ban (authentication failure monitor).
< INFO > Configure Awstats (logfile analyzer for mail and web server).
< INFO > Configure Roundcube webmail.
ERROR 2003 (HY000): Can't connect to MySQL server on '127.0.0.1' (111)
ERROR 2003 (HY000): Can't connect to MySQL server on '127.0.0.1' (111)
< INFO > Configure phpMyAdmin (web-based MySQL management tool).

*************************************************************************
* iRedMail-0.8.5 installation and configuration complete.
*******************************************************************

I read on the forum that it could be because of MySQL being installed before installing iRedMail but it is not the case here.

I did setup a MySQL password during iRedMail setup and did a FRESH install on the server.

What went wrong?

2 (edited by john.blue 2013-10-08 03:26:12)

Re: MySQL error during setup!

vidit.chopra wrote:

error: 'Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)'
Check that mysqld is running and that the socket: '/var/run/mysqld/mysqld.sock' exists!

Hi Vidit.

To find all socket files on your system run:

sudo find / -type s

Hopefully the socket for MySQL in the list will match the path above.

John

3

Re: MySQL error during setup!

Do you have MySQL installed and set a password BEFORE installing iRedMail? You should check it.

4

Re: MySQL error during setup!

yes I got the same problem. The problem is that 127.0.0.1 as hostname is not accepted by mysql while localhost is good.
Please use localhost instead of 127.0.0.1 plain ip address

try on centos 6.3:

mysql -h 127.0.0.1 -u root -p
ERROR 2003 (HY000): Can't connect to MySQL server on '127.0.0.1' (110)

but:

mysql -h localhost -u root -p
mysql>

good luck!